+ @Test
+ public void generatedUriIsSentToConsumerCorrectly() throws InterruptedException, ExecutionException, IOException {
+ List<String> generatedKeys = new ArrayList<>();
+ Future<Optional<Key>> key = fcpClient.clientPutDiskDir().onKeyGenerated(generatedKeys::add)
+ .fromDirectory(new File("")).uri("CHK@").execute();
+ connectAndAssert(this::matchesClientPutDiskDir);
+ replyWithGeneratedUri();
+ replyWithPutSuccessful(identifier);
+ assertThat(key.get().get().getKey(), is("KSK@foo.txt"));
+ assertThat(generatedKeys, contains("KSK@foo.txt"));
+ }
+