Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
package com.technologyconversations.java8exercises.streams;
import org.junit.Test;
import java.util.List;
import static com.technologyconversations.java8exercises.streams.ToUpperCase.*;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
Convert elements of a collection to upper case.
public class ToUpperCaseSpec {
public void transformShouldConvertCollectionElementsToUpperCase() {
List<String> collection = asList("My", "name", "is", "John", "Doe");
List<String> expected = asList("MY", "NAME", "IS", "JOHN", "DOE");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment