AnyMapAdapter { public static <I, O> O adapt(I object) { return getInstance().map(object); } AnyMapAdapter(); static O adapt(I object); static List<O> adaptList(Class<? extends I> type, List<I> list); void registerMapper(Class<? extends I> inputClass, Mapper<I, ?> mapper); O map(I object); List<O> mapList(Class<? extends I> type, List<I> input);  }
@Test public void testAdapt() throws Exception { AnyMapAdapter adapter = new AnyMapAdapter(); Mapper<Input, ?> mapper = mock(Mapper.class); adapter.registerMapper(Input.class, mapper); Input input = new Input(); adapter.map(input); verify(mapper).map(refEq(input)); }