#vulnerable code 
                              @Test
  public void testBitArrayAsBooleans() throws Exception {
    assertArrayEquals(new byte[]{(byte) 0xE3}, binStart().Bit(true, true, false, false, false, true, true, true).end().toByteArray());
    assertArrayEquals(new byte[]{(byte) 0x0B}, binStart().Bit(true, true, false, true).end().toByteArray());
  } 
                            #location 4 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                              @Test
  public void testBitArrayAsBooleans() throws Exception {
    assertArrayEquals(new byte[]{(byte) 0xE3}, BeginBin().Bit(true, true, false, false, false, true, true, true).End().toByteArray());
    assertArrayEquals(new byte[]{(byte) 0x0B}, BeginBin().Bit(true, true, false, true).End().toByteArray());
  }