@SuppressWarnings("unchecked")
@Test
public void shouldInvokeCustomTypeConverter() throws OgnlException {

when(converters.to(Tail.class)).thenReturn(converter);
when(converter.convert("15", Tail.class, bundle)).thenReturn(new Tail(15));
	
Map<?,?> context = Ognl.createDefaultContext(myCat);
Ognl.setTypeConverter(context, adapter);
Ognl.setValue("tail", context, myCat, "15");
assertThat(myCat.tail.length, is(equalTo(15)));
}