@Test(groups = "unit", expectedExceptions = NullPointerException.class) public void should_throw_npe_when_null_key_on_regular_statement() throws Exception { Map<String, ByteBuffer> payload = new HashMap<String, ByteBuffer>(); payload.put(null, ByteBuffer.wrap(new byte[] {1})); new SimpleStatement("SELECT c2 FROM t1 where c1 = ?", 1).setOutgoingPayload(payload); }
@Test(groups = "unit", expectedExceptions = NullPointerException.class) public void should_throw_npe_when_null_value_on_regular_statement() throws Exception { Map<String, ByteBuffer> payload = new HashMap<String, ByteBuffer>(); payload.put("k1", null); new SimpleStatement("SELECT c2 FROM t1 where c1 = ?", 1).setOutgoingPayload(payload); }
assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setOutgoingPayload(MOCK_PAYLOAD); expectedSize += 2 // size of number of keys in the map
@Test(groups = "unit", expectedExceptions = NullPointerException.class) public void should_throw_npe_when_null_key_on_regular_statement() throws Exception { Map<String, ByteBuffer> payload = new HashMap<String, ByteBuffer>(); payload.put(null, ByteBuffer.wrap(new byte[] {1})); new SimpleStatement("SELECT c2 FROM t1 where c1 = ?", 1).setOutgoingPayload(payload); }
@Test(groups = "unit", expectedExceptions = NullPointerException.class) public void should_throw_npe_when_null_value_on_regular_statement() throws Exception { Map<String, ByteBuffer> payload = new HashMap<String, ByteBuffer>(); payload.put("k1", null); new SimpleStatement("SELECT c2 FROM t1 where c1 = ?", 1).setOutgoingPayload(payload); }
assertThat(v5SizeOf(statement)).isEqualTo(expectedSize); statement.setOutgoingPayload(MOCK_PAYLOAD); expectedSize += 2 // size of number of keys in the map