MySQLBitBinlogProtocolValue implements MySQLBinlogProtocolValue { @Override public Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload) { return payload.readLong(getLength(columnDef.getColumnMeta())); }  @Override Serializable read(final MySQLBinlogColumnDef columnDef, final MySQLPacketPayload payload);  }
@Test public void assertReadWithLength1() { when(columnDef.getColumnMeta()).thenReturn(1); when(payload.readLong(1)).thenReturn(1L); assertThat(actual.read(columnDef, payload), is(1L)); }
@Test public void assertReadWithLength3() { when(columnDef.getColumnMeta()).thenReturn(516); when(payload.readLong(3)).thenReturn(1L); assertThat(actual.read(columnDef, payload), is(1L)); }
@Test public void assertReadWithLength5() { when(columnDef.getColumnMeta()).thenReturn(1280); when(payload.readLong(5)).thenReturn(1L); assertThat(actual.read(columnDef, payload), is(1L)); }
@Test public void assertReadWithLength8() { when(columnDef.getColumnMeta()).thenReturn(2048); when(payload.readLong(8)).thenReturn(-1L); assertThat(actual.read(columnDef, payload), is(-1L)); }