consensus-bizur/src/test/java/com/mboysan/consensus/BizurNodeTest.java
/**
     * Tests validation failures for operations when key/value provided are null.
     */
Tests validation failures for operations when key/value provided are null.
Tests validation failures for operations when key / value provided are null .
@Test
    void testWhenInvalidKeyValueOperationFails() throws Exception {
        init(3);
        int leaderId = assertOneLeader();
        assertThrows(ExecutionException.class, () -> getNode(leaderId).set("key", null).get());
        assertThrows(ExecutionException.class, () -> getNode(leaderId).set(null, "value").get());
        assertThrows(ExecutionException.class, () -> getNode(leaderId).set(null, null).get());
        assertThrows(ExecutionException.class, () -> getNode(leaderId).get((String) null).get());
    }
@ Test void testWhenInvalidKeyValueOperationFails ( ) throws Exception { init ( 3 ) ; int leaderId = assertOneLeader ( ) ; assertThrows ( ExecutionException . class , ( ) -> getNode ( leaderId ) . set ( "key" , null ) . get ( ) ) ; assertThrows ( ExecutionException . class , ( ) -> getNode ( leaderId ) . set ( null , "value" ) . get ( ) ) ; assertThrows ( ExecutionException . class , ( ) -> getNode ( leaderId ) . set ( null , null ) . get ( ) ) ; assertThrows ( ExecutionException . class , ( ) -> getNode ( leaderId ) . get ( ( String ) null ) . get ( ) ) ; }
Tests validation failures for operations when key/value provided are null.
Tests validation failures for operations when key / value provided are null .