### Question:
JsonProvider { public <T> T jsonToObject(String json, Class<T> clazz) throws JsonProcessingException { return objectMapper.readValue(json, clazz); } JsonProvider(); String objectToJSON(T object); String objectToPrettyJSON(T object); T jsonToObject(String json, Class<T> clazz); ObjectMapper getObjectMapper();  }### Answer:
@Test void validatorsRequestTest() throws JsonProcessingException { final String PUBKEY = "0xa99a76ed7796f7be22d5b7e85deeb7c5677e88e511e0b337618f8c4eb61349b4bf2d153f649f7b53359fe8b94a38e44c"; final String data = "{\n" + " \"epoch\": 0, \n" + " \"pubkeys\": [\n" + "\"" + PUBKEY + "\"\n" + " ]\n" + "}"; ValidatorsRequest result = jsonProvider.jsonToObject(data, ValidatorsRequest.class); assertThat(result.epoch).isEqualTo(UInt64.ZERO); assertThat(result.pubkeys).isEqualTo(List.of(BLSPubKey.fromHexString(PUBKEY))); }