### Question:
TypedConverter implements Converter<A, B> { @Nullable public final B convertCasted( @Nullable Object source ) throws ConversionException { return convert( fromClass.cast( source ) ); } TypedConverter( @Nonnull Class<A> fromClass, @Nonnull Class<B> toClass ); Class<A> getFromClass(); Class<B> getToClass(); @Nullable abstract B doConvert( @Nonnull A source ); @Nullable B doConvertNull(); @Nullable final B convertCasted( @Nullable Object source ); @Nullable final B convert( @Nullable A source );  }### Answer:
@Test public void convertCasted() { Assert.assertEquals( "20", converter.convertCasted( 20 ) ); }
@Test( expected = ClassCastException.class ) public void convertCastedIncompatibel() { converter.convertCasted( "20" ); }