@Test
public void testMap() throws Exception {

  Mapper<Object, Integer> mapper =
      ClassBasedMapper.<Object, Integer>builder()
          .addMapper(Float.class, Math::round)
          .addMapper(String.class, Integer::parseInt)
          .build();
  assertEquals(new Integer(1), mapper.map(new Float(1.2)));
  assertEquals(new Integer(3), mapper.map("3"));
}