ZebraSeataConfigurationValidator { public static void validate(ZebraSeataConfiguration zebraSeataConfiguration) { validateRequiredConf(zebraSeataConfiguration); } private  ZebraSeataConfigurationValidator(); static void validate(ZebraSeataConfiguration zebraSeataConfiguration);  }
@Test public void testRequiredConfMissing() { Properties properties = new Properties(); properties.put("transport.heartbeat", true); ZebraSeataConfiguration zebraSeataConfiguration = new ZebraSeataConfiguration(properties); try { ZebraSeataConfigurationValidator.validate(zebraSeataConfiguration); fail("Must have exception"); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), is("service.default.grouplist is required.")); } }
@Test public void testRequiredConfOccur() { Properties properties = new Properties(); properties.put("service.default.grouplist", "127.0.0.1:8091"); ZebraSeataConfiguration zebraSeataConfiguration = new ZebraSeataConfiguration(properties); ZebraSeataConfigurationValidator.validate(zebraSeataConfiguration); }