@Test
public void reloadingPluginWorks() throws InterruptedException, ExecutionException, IOException {
Future<Optional<PluginInfo>> pluginInfo = fcpClient.reloadPlugin().plugin(CLASS_NAME).execute();
- connectAndAssert(() -> matchReloadPluginMessage());
+ connectAndAssert(this::matchReloadPluginMessage);
replyWithPluginInfo();
verifyPluginInfo(pluginInfo);
}
@Test
public void removingPluginWorks() throws InterruptedException, ExecutionException, IOException {
Future<Boolean> pluginRemoved = fcpClient.removePlugin().plugin(CLASS_NAME).execute();
- connectAndAssert(() -> matchPluginRemovedMessage());
+ connectAndAssert(this::matchPluginRemovedMessage);
replyWithPluginRemoved();
assertThat(pluginRemoved.get(), is(true));
}
@Test
public void gettingPluginInfoWorks() throws InterruptedException, ExecutionException, IOException {
Future<Optional<PluginInfo>> pluginInfo = fcpClient.getPluginInfo().plugin(CLASS_NAME).execute();
- connectAndAssert(() -> matchGetPluginInfoMessage());
+ connectAndAssert(this::matchGetPluginInfoMessage);
replyWithPluginInfo();
verifyPluginInfo(pluginInfo);
}
.uri("KSK@foo.txt")
.execute();
connectNode();
- readMessage("Hello", () -> matchesDirectClientPut());
+ readMessage("Hello", this::matchesDirectClientPut);
}
@Test
.uri("KSK@foo.txt")
.execute();
connectNode();
- readMessage("Hello", () -> matchesDirectClientPut());
+ readMessage("Hello", this::matchesDirectClientPut);
replyWithPutFailed("not-the-right-one");
replyWithPutSuccessful(identifier);
assertThat(key.get().get().getKey(), is("KSK@foo.txt"));
.uri("KSK@foo.txt")
.execute();
connectNode();
- readMessage("Hello", () -> matchesDirectClientPut());
+ readMessage("Hello", this::matchesDirectClientPut);
replyWithPutSuccessful("not-the-right-one");
replyWithPutFailed(identifier);
assertThat(key.get().isPresent(), is(false));
sendDdaRequired(identifier);
readMessage(() -> matchesTestDDARequest(ddaFile));
sendTestDDAReply(ddaFile.getParent(), new File(ddaFile + ".foo"));
- readMessage(() -> matchesFailedToReadResponse());
+ readMessage(this::matchesFailedToReadResponse);
}
@Test