MappedFieldsTracker { public Object getMappedValue(Object src, Class<?> destType, String mapId) { Map<Integer, MapIdField> alreadyMappedFields = mappedFields.get(src); if (alreadyMappedFields != null) { for (MapIdField alreadyMappedField : alreadyMappedFields.values()) { Object mappedValue = alreadyMappedField.get(mapId); if (mappedValue != null && destType.isAssignableFrom(mappedValue.getClass())) { return mappedValue; } } } return null; }  Integer startTransaction(); void commitTransaction(Integer txId); void rollbackTransaction(Integer txId); boolean hasTransaction(); void put(Object src, Object dest, String mapId); void put(Object src, Object dest); Object getMappedValue(Object src, Class<?> destType, String mapId); Object getMappedValue(Object src, Class<?> destType);  }
@Test public void testGetMappedValue() { assertNull(tracker.getMappedValue("", String.class)); }