@Test public void testFields() { final NullNode node = NullNode.getInstance(); assertEquals(0, node.getTreeSize()); assertNull(node.getName()); assertNull(node.getLeft()); assertNull(node.getRight()); }
@Test public void testWalk() throws Exception { NullNode.getInstance().walk(); Mockito.verifyZeroInteractions(getStdOutMock()); }
/** 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()); }