ValueNormaliser { public static Object normaliseValue(Object value) throws SQLException { if (value == null) { return null; } TypeTransformer transformer = TypeNormaliserFactory.getNormaliser(value.getClass()); return (transformer == null) ? value : transformer.transform(value); }  static Object normaliseValue(Object value);  }
@Test public void canNormaliseValuesForRegisteredTypes() throws SQLException { assertEquals("TEST", ValueNormaliser.normaliseValue("test")); }
@Test public void normalisedNullIsNull() throws SQLException { assertNull(ValueNormaliser.normaliseValue(null)); }
@Test public void normaliseValueIsIdentityForUnregisteredTypes() throws SQLException { Integer value = Integer.valueOf(13); assertEquals(value, ValueNormaliser.normaliseValue(value)); }