Topology { public Topology() { } Topology();  Topology(String name, int group, int alert); String getName(); void setName(String name); int getNumOfSpout(); void setNumOfSpout(int numOfSpout); int getNumOfAlertBolt(); void setNumOfAlertBolt(int numOfAlertBolt); int getNumOfGroupBolt(); void setNumOfGroupBolt(int numOfGroupBolt); String getSpoutId(); void setSpoutId(String spoutId); String getPubBoltId(); void setPubBoltId(String pubBoltId); Set<String> getGroupNodeIds(); void setGroupNodeIds(Set<String> groupNodeIds); Set<String> getAlertBoltIds(); void setAlertBoltIds(Set<String> alertBoltIds); int getNumOfPublishBolt(); void setNumOfPublishBolt(int numOfPublishBolt); int getSpoutParallelism(); void setSpoutParallelism(int spoutParallelism); int getGroupParallelism(); void setGroupParallelism(int groupParallelism); int getAlertParallelism(); void setAlertParallelism(int alertParallelism); String getClusterName(); void setClusterName(String clusterName);  }
@Test public void testTopology() { Topology topology = new Topology("test", 2, 3); Assert.assertEquals(null, topology.getClusterName()); Assert.assertEquals("test", topology.getName()); Assert.assertEquals(null, topology.getPubBoltId()); Assert.assertEquals(null, topology.getSpoutId()); Assert.assertEquals(0, topology.getAlertBoltIds().size()); Assert.assertEquals(1, topology.getAlertParallelism()); Assert.assertEquals(0, topology.getGroupNodeIds().size()); Assert.assertEquals(1, topology.getGroupParallelism()); Assert.assertEquals(3, topology.getNumOfAlertBolt()); Assert.assertEquals(2, topology.getNumOfGroupBolt()); Assert.assertEquals(0, topology.getNumOfPublishBolt()); Assert.assertEquals(1, topology.getNumOfSpout()); Assert.assertEquals(1, topology.getSpoutParallelism()); Topology topology1 = new Topology("test", 2, 3); Assert.assertFalse(topology1.equals(topology)); Assert.assertFalse(topology1.hashCode() == topology.hashCode()); Assert.assertFalse(topology1 == topology); }