@Test(expected = ObjectToIdMappingException.class) public void failsWhenMetaDataShouldBeStoredForAPropertyThatAlreadyHasMetaData() { cut.storeMetaDataOrFail(list1, exampleMetaData1); cut.storeMetaDataOrFail(list1, exampleMetaData2); }
public void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData) throws ObjectToIdMappingException { if (listToData.get(list) != null) { throw new ObjectToIdMappingException("Meta data for a known property should be registered twice. " + "The clients may no longer be synchron."); } listToData.put(list, metaData); }
ListPropertyMetaDataStore { public void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData) throws ObjectToIdMappingException { if (listToData.get(list) != null) { throw new ObjectToIdMappingException("Meta data for a known property should be registered twice. " + "The clients may no longer be synchron."); } listToData.put(list, metaData); } }
ListPropertyMetaDataStore { public void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData) throws ObjectToIdMappingException { if (listToData.get(list) != null) { throw new ObjectToIdMappingException("Meta data for a known property should be registered twice. " + "The clients may no longer be synchron."); } listToData.put(list, metaData); } ListPropertyMetaDataStore(final WeakObjectRegistry objectRegistry); }
ListPropertyMetaDataStore { public void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData) throws ObjectToIdMappingException { if (listToData.get(list) != null) { throw new ObjectToIdMappingException("Meta data for a known property should be registered twice. " + "The clients may no longer be synchron."); } listToData.put(list, metaData); } ListPropertyMetaDataStore(final WeakObjectRegistry objectRegistry); ListPropertyMetaData getMetaDataOrFail(final List<?> list); ListPropertyMetaData getMetaDataOrFail(final UUID listId); void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData); boolean hasMetaDataFor(final List<?> list); }
ListPropertyMetaDataStore { public void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData) throws ObjectToIdMappingException { if (listToData.get(list) != null) { throw new ObjectToIdMappingException("Meta data for a known property should be registered twice. " + "The clients may no longer be synchron."); } listToData.put(list, metaData); } ListPropertyMetaDataStore(final WeakObjectRegistry objectRegistry); ListPropertyMetaData getMetaDataOrFail(final List<?> list); ListPropertyMetaData getMetaDataOrFail(final UUID listId); void storeMetaDataOrFail(final List<?> list, final ListPropertyMetaData metaData); boolean hasMetaDataFor(final List<?> list);  }