ProfilerConfig implements Serializable { public String toJSON() throws JsonProcessingException { return JSONUtils.INSTANCE.toJSON(this, true); }  List<ProfileConfig> getProfiles(); void setProfiles(List<ProfileConfig> profiles); ProfilerConfig withProfile(ProfileConfig profileConfig); @JsonGetter("timestampField") String getTimestampFieldForJson(); Optional<String> getTimestampField(); @JsonSetter("timestampField") void setTimestampField(String timestampField); void setTimestampField(Optional<String> timestampField); ProfilerConfig withTimestampField(Optional<String> timestampField); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); static ProfilerConfig fromBytes(byte[] bytes); static ProfilerConfig fromJSON(String json); String toJSON();  }
@Test public void testToJSON() throws Exception { ProfilerConfig expected = ProfilerConfig.fromJSON(profile); String asJson = expected.toJSON(); ProfilerConfig actual = ProfilerConfig.fromJSON(asJson); assertEquals(expected, actual); }