Пример #1
0
 @Test
 public void testFields() {
   final NullNode node = NullNode.getInstance();
   assertEquals(0, node.getTreeSize());
   assertNull(node.getName());
   assertNull(node.getLeft());
   assertNull(node.getRight());
 }
Пример #2
0
 @Test
 public void testWalk() throws Exception {
   NullNode.getInstance().walk();
   Mockito.verifyZeroInteractions(getStdOutMock());
 }
Пример #3
0
 /** Verify if {@link NullNode#getInstance()} actually returns the same object instance */
 @Test
 public void testGetInstance() {
   final NullNode instance = NullNode.getInstance();
   assertNotNull(instance);
   assertSame(instance, NullNode.getInstance());
 }