Entry { @JsonCreator public Entry(@JsonProperty("key") byte[] key, @JsonProperty("value") byte[] value, @JsonProperty("version") Version version, @JsonProperty("timestamp") long timestamp, @JsonProperty("maxAge") Long maxAgeInMs) { Preconditions.checkNotNull(key, "key is null"); Preconditions.checkNotNull(version, "version is null"); Preconditions.checkArgument(maxAgeInMs == null || maxAgeInMs > 0, "maxAgeInMs must be greater than 0"); this.value = value; this.key = key; this.timestamp = timestamp; this.maxAgeInMs = maxAgeInMs; this.version = version; } @JsonCreator  Entry(@JsonProperty("key") byte[] key,
            @JsonProperty("value") byte[] value,
            @JsonProperty("version") Version version, 
            @JsonProperty("timestamp") long timestamp,
            @JsonProperty("maxAge") Long maxAgeInMs); @JsonProperty byte[] getKey(); @JsonProperty byte[] getValue(); @JsonProperty Version getVersion(); @JsonProperty long getTimestamp(); @JsonProperty Long getMaxAgeInMs(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEntry() { Entry entry = entryOf("fruit", "apple", 123, 456); assertEquals(entry.getKey(), "fruit".getBytes(UTF_8)); assertEquals(entry.getValue(), "apple".getBytes(UTF_8)); assertEquals(entry.getVersion().getSequence(), 123); assertEquals(entry.getTimestamp(), 456); assertEquals(entry.getMaxAgeInMs(), null); }