### Question:
Service extends com.alibaba.nacos.api.naming.pojo.Service implements Record, RecordListener<Instances> { public String toJson() { return JacksonUtils.toJson(this); } Service();  Service(String name); @JsonIgnore PushService getPushService(); long getIpDeleteTimeout(); void setIpDeleteTimeout(long ipDeleteTimeout); void processClientBeat(final RsInfo rsInfo); Boolean getEnabled(); void setEnabled(Boolean enabled); long getLastModifiedMillis(); void setLastModifiedMillis(long lastModifiedMillis); Boolean getResetWeight(); void setResetWeight(Boolean resetWeight); Selector getSelector(); void setSelector(Selector selector); @Override boolean interests(String key); @Override boolean matchUnlistenKey(String key); @Override void onChange(String key, Instances value); @Override void onDelete(String key); int healthyInstanceCount(); boolean triggerFlag(); void updateIPs(Collection<Instance> instances, boolean ephemeral); void init(); void destroy(); boolean isEmpty(); List<Instance> allIPs(); List<Instance> allIPs(boolean ephemeral); List<Instance> allIPs(List<String> clusters); List<Instance> srvIPs(List<String> clusters); String toJson(); @JsonIgnore String getServiceString(); String getToken(); void setToken(String token); List<String> getOwners(); void setOwners(List<String> owners); Map<String, Cluster> getClusterMap(); void setClusterMap(Map<String, Cluster> clusterMap); String getNamespaceId(); void setNamespaceId(String namespaceId); void update(Service vDom); @Override String getChecksum(); synchronized void recalculateChecksum(); int getFinalizeCount(); void setFinalizeCount(int finalizeCount); void addCluster(Cluster cluster); void validate();  }### Answer:
@Test public void testSerialize() throws Exception { String actual = new Service("test-service").toJson(); System.out.println(actual); assertTrue(actual.contains("\"checksum\":\"394c845e1160bb880e7f26fb2149ed6d\"")); assertTrue(actual.contains("\"clusterMap\":{}")); assertTrue(actual.contains("\"empty\":true")); assertTrue(actual.contains("\"enabled\":true")); assertTrue(actual.contains("\"finalizeCount\":0")); assertTrue(actual.contains("\"ipDeleteTimeout\":30000")); assertTrue(actual.contains("\"lastModifiedMillis\":0")); assertTrue(actual.contains("\"metadata\":{}")); assertTrue(actual.contains("\"name\":\"test-service\"")); assertTrue(actual.contains("\"owners\":[]")); assertTrue(actual.contains("\"protectThreshold\":0.0")); assertTrue(actual.contains("\"resetWeight\":false")); assertTrue(actual.contains("\"selector\":{\"type\":\"none\"}")); assertFalse(actual.contains("clientBeatCheckTask")); assertFalse(actual.contains("serviceString")); assertFalse(actual.contains("pushService")); }