ConvertObjectToClass implements Converter<Object, Class<?>> { @Override public Class<?> convert(final Object from) { if (from == null) { return null; } return from.getClass(); }  @Override Class<?> convert(final Object from);  }
@Test public void objectIsConvertedToClass() throws Exception { assertThat(new ConvertObjectToClass().convert(new ExampleClass()), equalTo((Object) ExampleClass.class)); }