Skip to content

Conversation

gloomygenius
Copy link

Part1 (by Vasilii Bobkov)


final List<Person> persons = streamPerson.collect(toList());
assertThat(persons.size(), is(1));
assertEquals(person, persons.get(0));

// TODO Create completed CompletableFuture
final CompletableFuture<Person> futurePerson = null;
final CompletableFuture<Person> futurePerson = new CompletableFuture<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use .completedFuture

assertEquals(person, result2.get());

// TODO Create completed CompletableFuture
final CompletableFuture<Person> futurePerson = null;
final CompletableFuture<Person> futurePerson = new CompletableFuture<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above


assertEquals(person.getFirstName(), streamFirstName.collect(toList()).get(0));

// TODO Create completed CompletableFuture
final CompletableFuture<Person> futurePerson = null;
final CompletableFuture<Person> futurePerson = new CompletableFuture<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.


final int[] codePointsArray = codePoints.toArray();
assertEquals(person.getFirstName(), new String(codePointsArray, 0, codePointsArray.length));

// TODO Create completed CompletableFuture
final CompletableFuture<Person> futurePerson = null;
final CompletableFuture<Person> futurePerson = new CompletableFuture<>();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants