MatcherRegistry implements Matcher { public Transform match(Class type) throws Exception { return transformerMap.get(type); } MatcherRegistry(Map<Class, Transform> transformerMap); Transform match(Class type);  }
@Test public void shouldMatchMappedTx() throws Exception { assertEquals(DATE_TX, toTest.match(Date.class)); assertEquals(BOOLEAN_TX, toTest.match(boolean.class)); assertEquals(BOOLEAN_TX, toTest.match(Boolean.class)); }
@Test public void shouldntMatchUnmappedTx() throws Exception { assertNull(toTest.match(String.class)); }