### Question:
Practice3 { static List<String> getStrings(final List<String> data) { return Lists.select( isNotNull.and(hasLengthInRange).and(hasCorrectFirstOrLastLetter).and(contains("JUG")), data ); }    }### Answer:
@Test public void returns_empty_List_for_an_empty_List() { final List<String> values = Collections.emptyList(); final List<String> actual = Practice3.getStrings(values); assertTrue(actual.isEmpty()); }
@Test public void returns_empty_List_if_no_strings_are_correct() { final List<String> values = Arrays.asList( null, "", "aJUGa", "C++++", "c++++J", "JUG", "C12345JUG6789D" ); final List<String> actual = Practice3.getStrings(values); assertTrue(actual.isEmpty()); }
@Test public void returns_List_with_Strings_that_satisfy_the_predicate() { final List<String> values = Arrays.asList( null, "", "JUG is NOT cool!!!!", "JUG=cool", "This workshop sucks", "JUG Lodz", "C12345JUG6789D", "JoinJUG" ); final List<String> expected = Arrays.asList( "JUG=cool", "JUG Lodz", "JoinJUG" ); final List<String> actual = Practice3.getStrings(values); assertEquals(expected, actual); }