use of org.datatransferproject.spi.transfer.security.PublicKeySerializer in project data-transfer-project by google.
the class JobPollingServiceTest method setUp.
@Before
public void setUp() {
store = new LocalJobStore();
PublicKeySerializer serializer = new PublicKeySerializer() {
@Override
public boolean canHandle(String scheme) {
return true;
}
@Override
public String serialize(byte[] encodedPublicKey) throws SecurityException {
return "key";
}
};
Scheduler scheduler = Scheduler.newFixedDelaySchedule(0, 20, TimeUnit.SECONDS);
Monitor monitor = new Monitor() {
};
ExtensionContext extensionContext = mock(ExtensionContext.class);
when(extensionContext.getSetting("credTimeoutSeconds", 300)).thenReturn(300);
jobPollingService = new JobPollingService(store, asymmetricKeyGenerator, serializer, scheduler, monitor, extensionContext);
}
Aggregations