CursorKeyRedisSerializer implements RedisSerializer<RedisCursorKey> { @Override public RedisCursorKey deserialize(final byte[] bytes) throws SerializationException { final String[] values = CODEC.deserialize(bytes); if (values == null) { return null; } return new RedisCursorKey(values[0], values[1], values[2]); }  @Override byte[] serialize(final RedisCursorKey cursorKey); @Override RedisCursorKey deserialize(final byte[] bytes); static final Codec CODEC; }
@Test public void canDeserializeNullValue() { assertThat(serializer.deserialize(null), is(nullValue())); }