StreamPartition implements Serializable { public StreamPartition() { } StreamPartition();  StreamPartition(StreamPartition o); @Override boolean equals(Object other); @Override int hashCode(); void setType(Type type); Type getType(); List<String> getColumns(); void setColumns(List<String> columns); String getStreamId(); void setStreamId(String streamId); StreamSortSpec getSortSpec(); void setSortSpec(StreamSortSpec sortSpec); @Override String toString();  }
@Test public void testStreamPartition() { StreamSortSpec streamSortSpec = new StreamSortSpec(); streamSortSpec.setWindowPeriod("PT10S"); StreamPartition streamPartition = new StreamPartition(); Assert.assertEquals("StreamPartition[streamId=null,type=null,columns=[],sortSpec=[null]]", streamPartition.toString()); List<String> columns = new ArrayList<>(); columns.add("jobId"); streamPartition.setColumns(columns); streamPartition.setSortSpec(streamSortSpec); streamPartition.setStreamId("test"); streamPartition.setType(StreamPartition.Type.GROUPBY); Assert.assertEquals("StreamPartition[streamId=test,type=GROUPBY,columns=[jobId],sortSpec=[StreamSortSpec[windowPeriod=PT10S,windowMargin=30000]]]", streamPartition.toString()); Assert.assertTrue(streamPartition.equals(new StreamPartition(streamPartition))); Assert.assertTrue(streamPartition.hashCode() == new StreamPartition(streamPartition).hashCode()); }