### Question:
EventSerializerGson implements EventSerializer { @Override @Lock(LockType.READ) public String serialize(List<? extends Serializable> events) { if (events == null) throw new IllegalArgumentException("events must not be null"); EventList evlist = new EventList(events); return gson.toJson(evlist); }  @PostConstruct void init(); @Override @Lock(LockType.READ) String serialize(List<? extends Serializable> events); @Override @Lock(LockType.READ) List<? extends Serializable> deserialize(String body); static GsonBuilder createBuilder();  }### Answer:
@Test public void testSerialize() { List<String> objs = instance(); String result = serializer.serialize(objs); assertEquals(result, EXPECTED); }
@Test public void test_custom_converters() { List<TestObject> objs = new ArrayList<>(); objs.add(new TestObject("DUMMY")); String result = serializer.serialize(objs); assertEquals(result, "{\"version\":1,\"events\":[{\"type\":\"" + "org.jeeventstore.serialization.gson.TestObject\"" + ",\"body\":\"HELLO\"}]}"); }