@Test public void testDrainStatus(){ BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus jvm1DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus("url1","jvm1", "app1", "On", "Off", "Off", "Off"); BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus jvm2DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus("url2","jvm2", "app1", "On", "Off", "Off", "Off"); BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus jvm3DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus("url3","jvm3", "app1", "Off", "Off", "On", "Off"); BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus jvm4DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus("url4","jvm4", "app1", "On", "Off", "Off", "Off"); List<BalancerManagerState.GroupDrainStatus.WebServerDrainStatus.JvmDrainStatus> jvmDrainStatusList = new ArrayList<>(); jvmDrainStatusList.add(jvm1DrainStatus); jvmDrainStatusList.add(jvm2DrainStatus); jvmDrainStatusList.add(jvm3DrainStatus); jvmDrainStatusList.add(jvm4DrainStatus); BalancerManagerState.GroupDrainStatus.WebServerDrainStatus webServer1DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus("webServer1", jvmDrainStatusList); BalancerManagerState.GroupDrainStatus.WebServerDrainStatus webServer2DrainStatus = new BalancerManagerState.GroupDrainStatus.WebServerDrainStatus("webServer2", jvmDrainStatusList); List<BalancerManagerState.GroupDrainStatus.WebServerDrainStatus> webServerDrainStatusList = new ArrayList<>(); webServerDrainStatusList.add(webServer1DrainStatus); webServerDrainStatusList.add(webServer2DrainStatus); BalancerManagerState.GroupDrainStatus groupDrainStatus = new BalancerManagerState.GroupDrainStatus("group1",webServerDrainStatusList); List<BalancerManagerState.GroupDrainStatus> groupDrainStatusList = new ArrayList<>(); groupDrainStatusList.add(groupDrainStatus); BalancerManagerState balancerManagerState = new BalancerManagerState(groupDrainStatusList); assertEquals(getExpectedString(), balancerManagerState.toString()); }
@Override public String toString() { return "BalancerManagerState{" + "groups=" + groups + '}'; }
BalancerManagerState { @Override public String toString() { return "BalancerManagerState{" + "groups=" + groups + '}'; } }
BalancerManagerState { @Override public String toString() { return "BalancerManagerState{" + "groups=" + groups + '}'; } BalancerManagerState(List<BalancerManagerState.GroupDrainStatus> groups); }
BalancerManagerState { @Override public String toString() { return "BalancerManagerState{" + "groups=" + groups + '}'; } BalancerManagerState(List<BalancerManagerState.GroupDrainStatus> groups); List<GroupDrainStatus> getGroups(); void setGroups(List<GroupDrainStatus> groups); @Override String toString(); }
BalancerManagerState { @Override public String toString() { return "BalancerManagerState{" + "groups=" + groups + '}'; } BalancerManagerState(List<BalancerManagerState.GroupDrainStatus> groups); List<GroupDrainStatus> getGroups(); void setGroups(List<GroupDrainStatus> groups); @Override String toString();  }