### Question:
RemoveExtension implements Function<String, String> { @Override public String apply(String value) { return value.contains(".") ? value.substring(0, value.lastIndexOf('.')) : value; }  @Override String apply(String value);  }### Answer:
@Test public void apply() { RemoveExtension removeExtension = new RemoveExtension(); String result = removeExtension.apply("str.txt"); assertEquals("str", result); }