### Question:
ToLowerCaseFunction implements Function<String, String> { @Override @Nullable public String apply(@Nullable String input) { return input == null ? null : input.toLowerCase(locale); } ToLowerCaseFunction(@Nonnull Locale locale);  ToLowerCaseFunction(); @Override @Nullable String apply(@Nullable String input);  }### Answer:
@Test public void shouldConvertToUpperCase() { ToLowerCaseFunction toLowerCaseFunction = new ToLowerCaseFunction(Locale.ENGLISH); String upperCased = toLowerCaseFunction.apply(STRING_IN_UPPER_CASE); assertThat(upperCased, is(STRING_IN_LOWER_CASE)); }
@Test public void shouldConvertToUpperCaseWhenNoLocaleIsProvided() { ToLowerCaseFunction toLowerCaseFunction = new ToLowerCaseFunction(); String upperCased = toLowerCaseFunction.apply(STRING_IN_UPPER_CASE); assertThat(upperCased, is(STRING_IN_LOWER_CASE)); }
@Test public void shouldReturnNullIfInputIsNull() { ToLowerCaseFunction toLowerCaseFunction = new ToLowerCaseFunction(Locale.ENGLISH); String upperCased = toLowerCaseFunction.apply(null); assertThat(upperCased, nullValue()); }