TemporalBin extends Bin { public static TemporalBin read(DataInput dataInput) throws IOException { TemporalBin bin = new TemporalBin(); bin.readFields(dataInput); return bin; } TemporalBin();  TemporalBin(long index, int numFeatures); int getNumPasses(); void setNumPasses(int numPasses); void write(DataOutput dataOutput); void readFields(DataInput dataInput); static TemporalBin read(DataInput dataInput); static TemporalBin read(long index, DataInput dataInput); @Override String toString();  }
@Test public void testBinCreationWithIndex() throws Exception { final TemporalBin bin = TemporalBin.read(10L, new DataInputStream(new InputStream() { @Override public int read() throws IOException { return 0; } })); assertEquals(10L, bin.getIndex()); }