MySQLNullBitmap { public boolean isNullParameter(final int index) { return (nullBitmap[getBytePosition(index)] & (1 << getBitPosition(index))) != 0; } MySQLNullBitmap(final int columnsNumbers, final int offset);  MySQLNullBitmap(final int columnNumbers, final MySQLPacketPayload payload); boolean isNullParameter(final int index); void setNullBit(final int index);  }
@Test public void assertNewMySQLNullBitmapFromPayload() { when(payload.readInt1()).thenReturn(0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80); MySQLNullBitmap actual = new MySQLNullBitmap(64, payload); assertTrue(actual.isNullParameter(0)); assertTrue(actual.isNullParameter(9)); assertTrue(actual.isNullParameter(63)); assertFalse(actual.isNullParameter(1)); assertFalse(actual.isNullParameter(62)); }
@Test public void assertIsNotNullParameter() { MySQLNullBitmap actual = new MySQLNullBitmap(8, 0); assertFalse(actual.isNullParameter(0)); }