assert mapper.isSupportedType(String.class);
assert mapper.isSupportedType(ByteArrayKey.class);
}
public void testTwoWayContract() {
Object[] toTest = { 0, new Byte("1"), new Short("2"), (long) 3, new Double("3.4"), new Float("3.5"), Boolean.FALSE, "some string", new ByteArrayKey("\000\001\002\050\0377\0376\0177\0176\000".getBytes()) };
for (Object o : toTest) {
Class<?> type = o.getClass();
String rep = mapper.getStringMapping(o);
assert o.equals(mapper.getKeyMapping(rep)) : String.format("Failed on type %s and value %s", type, rep);
}