@Test public void shouldReturnSimpleObjectMessageForSimpleObjectValue() { final Value message = cut.map("sample object", false); assertThat(message.getObservableObjectId()).isNull(); assertThat(message.getSimpleObjectValue()).isSameAs("sample object"); }
public Object map(final Value message) throws ObjectToIdMappingException { final UUID valueId = message.getObservableObjectId(); if (valueId != null) { return objectRegistry.getByIdOrFail(valueId); } else { return message.getSimpleObjectValue(); } }
ValueMapper { public Object map(final Value message) throws ObjectToIdMappingException { final UUID valueId = message.getObservableObjectId(); if (valueId != null) { return objectRegistry.getByIdOrFail(valueId); } else { return message.getSimpleObjectValue(); } } }
ValueMapper { public Object map(final Value message) throws ObjectToIdMappingException { final UUID valueId = message.getObservableObjectId(); if (valueId != null) { return objectRegistry.getByIdOrFail(valueId); } else { return message.getSimpleObjectValue(); } } ValueMapper(final WeakObjectRegistry objectRegistry); }
ValueMapper { public Object map(final Value message) throws ObjectToIdMappingException { final UUID valueId = message.getObservableObjectId(); if (valueId != null) { return objectRegistry.getByIdOrFail(valueId); } else { return message.getSimpleObjectValue(); } } ValueMapper(final WeakObjectRegistry objectRegistry); Object map(final Value message); Value map(final Object value, final boolean isObservable); }
ValueMapper { public Object map(final Value message) throws ObjectToIdMappingException { final UUID valueId = message.getObservableObjectId(); if (valueId != null) { return objectRegistry.getByIdOrFail(valueId); } else { return message.getSimpleObjectValue(); } } ValueMapper(final WeakObjectRegistry objectRegistry); Object map(final Value message); Value map(final Object value, final boolean isObservable);  }