diff --git a/pom.xml b/pom.xml index 434d64e54..5527c745d 100755 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ net.openhft chronicle-bom - 1.14.68 + 1.14.79 pom import diff --git a/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java b/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java new file mode 100644 index 000000000..b4ee8f840 --- /dev/null +++ b/src/test/java/net/openhft/chronicle/map/AbstractMarshallableKeyValueTest.java @@ -0,0 +1,28 @@ +package net.openhft.chronicle.map; + +import net.openhft.chronicle.wire.AbstractMarshallable; +import org.junit.Test; + +import static org.hamcrest.CoreMatchers.is; +import static org.junit.Assert.assertThat; + +public final class AbstractMarshallableKeyValueTest { + + @Test + public void shouldAcceptAbstractMarshallableComponents() throws Exception { + final ChronicleMap map = ChronicleMapBuilder.of(Key.class, Value.class).entries(10). + averageKey(new Key()).averageValue(new Value()).create(); + + map.put(new Key(), new Value()); + + assertThat(map.get(new Key()).number, is(new Value().number)); + } + + private static final class Key extends AbstractMarshallable { + private String k = "key"; + } + + private static final class Value extends AbstractMarshallable { + private Integer number = Integer.valueOf(17); + } +}