### Question:
PublisherRegistration extends BaseRegistration { @Override public String toString() { return "PublisherRegistration{" + "dataId='" + dataId + '\'' + ", group='" + group + '\'' + ", appName='" + appName + '\'' + '}'; } PublisherRegistration(String dataId); @Override String toString();  }### Answer:
@Test public void testAll() { PublisherRegistration registration = new PublisherRegistration("xxx"); Assert.assertEquals("xxx", registration.getDataId()); Assert.assertTrue(registration.toString().contains("xxx")); }