class ConvertObjectToClass implements Converter<Object, Class<?>> {

    @Override
    public Class<?> convert(final Object from) {
        if (from == null) {
            return null;
        }
        return from.getClass();
    }

}

class TestConvertObjectToClass {

    @Test
    public void objectIsConvertedToClass() throws Exception {

        assertThat(new ConvertObjectToClass().convert(new ExampleClass()), equalTo((Object) ExampleClass.class));
    }

}