StreamWorkSlotQueue { public StreamWorkSlotQueue() { } StreamWorkSlotQueue();  StreamWorkSlotQueue(StreamGroup par, boolean isDedicated, Map<String, Object> options,
                               List<WorkSlot> slots); Map<String, Object> getDedicateOption(); void setDedicateOption(Map<String, Object> dedicateOption); List<WorkSlot> getWorkingSlots(); boolean isDedicated(); void setDedicated(boolean dedicated); @JsonIgnore int getQueueSize(); int getNumberOfGroupBolts(); void setNumberOfGroupBolts(int numberOfGroupBolts); Map<String, Integer> getTopoGroupStartIndex(); void setTopoGroupStartIndex(Map<String, Integer> topoGroupStartIndex); @JsonIgnore int getTopologyGroupStartIndex(String topo); String getQueueId(); void setQueueId(String queueId);  }
@Test public void testStreamWorkSlotQueue() { StreamGroup streamGroup = new StreamGroup(); StreamSortSpec streamSortSpec = new StreamSortSpec(); streamSortSpec.setWindowPeriod("PT10S"); StreamPartition streamPartition = new StreamPartition(); List<String> columns = new ArrayList<>(); columns.add("jobId"); streamPartition.setColumns(columns); streamPartition.setSortSpec(streamSortSpec); streamPartition.setStreamId("test"); streamPartition.setType(StreamPartition.Type.GROUPBY); streamGroup.addStreamPartition(streamPartition); WorkSlot workSlot = new WorkSlot("setTopologyName", "setBoltId"); List<WorkSlot> workSlots = new ArrayList<>(); workSlots.add(workSlot); StreamWorkSlotQueue streamWorkSlotQueue = new StreamWorkSlotQueue(streamGroup, false, new HashMap<>(), workSlots); Assert.assertTrue(streamWorkSlotQueue.getQueueId().startsWith("SG[test-]")); Assert.assertTrue(streamWorkSlotQueue.getDedicateOption().isEmpty()); Assert.assertEquals(0, streamWorkSlotQueue.getNumberOfGroupBolts()); Assert.assertEquals(1, streamWorkSlotQueue.getQueueSize()); Assert.assertTrue(streamWorkSlotQueue.getTopoGroupStartIndex().isEmpty()); Assert.assertEquals(-1, streamWorkSlotQueue.getTopologyGroupStartIndex("")); Assert.assertEquals(workSlot, streamWorkSlotQueue.getWorkingSlots().get(0)); StreamWorkSlotQueue streamWorkSlotQueue1 = new StreamWorkSlotQueue(streamGroup, false, new HashMap<>(), workSlots); Assert.assertFalse(streamWorkSlotQueue.equals(streamWorkSlotQueue1)); Assert.assertFalse(streamWorkSlotQueue == streamWorkSlotQueue1); Assert.assertFalse(streamWorkSlotQueue.hashCode() == streamWorkSlotQueue1.hashCode()); }