### Question:
JsonProvider { public <T> String objectToJSON(T object) throws JsonProcessingException { return objectMapper.writeValueAsString(object); } JsonProvider(); String objectToJSON(T object); String objectToPrettyJSON(T object); T jsonToObject(String json, Class<T> clazz); ObjectMapper getObjectMapper();  }### Answer:
@Test public void UInt64ShouldSerializeToJson() throws JsonProcessingException { UInt64 data = dataStructureUtil.randomUInt64(); String serialized = jsonProvider.objectToJSON(data); assertEquals(serialized, Q + data.toString() + Q); }
@Test public void maxUInt64ShouldSerializeToJson() throws JsonProcessingException { UInt64 data = UInt64.MAX_VALUE; String serialized = jsonProvider.objectToJSON(data); assertEquals(serialized, Q + data.toString() + Q); }
@Test public void stringShouldSerializeToJson() throws JsonProcessingException { String data = "test"; assertEquals(Q + data + Q, jsonProvider.objectToJSON(data)); }
@Test void beaconStateJsonTest() throws JsonProcessingException { tech.pegasys.teku.datastructures.state.BeaconState stateInternal = dataStructureUtil.randomBeaconState(UInt64.valueOf(16)); BeaconState state = new BeaconState(stateInternal); String jsonState = jsonProvider.objectToJSON(state); assertTrue(jsonState.length() > 0); }