@Test public void writeBytes() throws Exception { OutputStream output = mock(OutputStream.class); mockStatic(IoUtil.class); IdBitMap.of(1).writeBytes(output); ByteBuffer buf = ByteBuffer.allocate(5) .order(ByteOrder.LITTLE_ENDIAN) .put(BitMapType.ID.getHead()) .putInt(1); verify(output).write(buf.array()); doThrow(new IOException()).when(output).write(any(byte[].class)); IdBitMap.of(1).writeBytes(output); verifyStatic(IoUtil.class, times(2)); IoUtil.close(output); }
public static ImmutableBitMap of(int id) { return new IdBitMap(id); }
IdBitMap extends RangeBitmap { public static ImmutableBitMap of(int id) { return new IdBitMap(id); } }
IdBitMap extends RangeBitmap { public static ImmutableBitMap of(int id) { return new IdBitMap(id); } private  IdBitMap(int id); }
IdBitMap extends RangeBitmap { public static ImmutableBitMap of(int id) { return new IdBitMap(id); } private  IdBitMap(int id); int getId(); static ImmutableBitMap of(int id); @Override ImmutableBitMap getAnd(ImmutableBitMap index); @Override ImmutableBitMap getOr(ImmutableBitMap index); @Override ImmutableBitMap clone(); @Override BitMapType getType(); @Override byte[] toBytes(); @Override String toString(); }
IdBitMap extends RangeBitmap { public static ImmutableBitMap of(int id) { return new IdBitMap(id); } private  IdBitMap(int id); int getId(); static ImmutableBitMap of(int id); @Override ImmutableBitMap getAnd(ImmutableBitMap index); @Override ImmutableBitMap getOr(ImmutableBitMap index); @Override ImmutableBitMap clone(); @Override BitMapType getType(); @Override byte[] toBytes(); @Override String toString();  }