Add tests using java serializer and kryo