ClassMapKeyFactory { public String createKey(Class<?> srcClass, Class<?> destClass) { return createKey(srcClass, destClass, null); } ClassMapKeyFactory(BeanContainer beanContainer); String createKey(Class<?> srcClass, Class<?> destClass); String createKey(Class<?> srcClass, Class<?> destClass, String mapId);  }
@Test public void testCreateKey() { String key1 = factory.createKey(String.class, Long.class); String key2 = factory.createKey(String.class, Long.class); assertEquals(key1, key2); }
@Test public void testCreateKey_Order() { String key1 = factory.createKey(String.class, Long.class); String key2 = factory.createKey(Long.class, String.class); assertNotSame(key1, key2); assertFalse(key1.equals(key2)); }
@Test public void testCreateKey_MapId() { String key1 = factory.createKey(String.class, Long.class, "id"); String key2 = factory.createKey(String.class, Long.class); assertNotSame(key1, key2); assertFalse(key1.equals(key2)); }
@Test public void testCreateKey_MapIdNull() { String key = factory.createKey(String.class, Long.class, null); assertNotNull(key); }