// self nested networks are allowed
 @Test
 public void testSetSelfNestedNetwork() {
   CyNode n1 = net.addNode();
   n1.setNetworkPointer(net);
   assertNotNull(n1.getNetworkPointer());
   assertEquals(net, n1.getNetworkPointer());
 }
 @Test
 public void testSetNestedNetwork() {
   CyNode n1 = net.addNode();
   CyNetwork net2 = mock(CyNetwork.class);
   n1.setNetworkPointer(net2);
   assertNotNull(n1.getNetworkPointer());
   assertEquals(net2, n1.getNetworkPointer());
 }
  // null nested networks are allowed
  @Test
  public void testSetNullNestedNetwork() {
    CyNode n1 = net.addNode();

    // put a real network here first
    CyNetwork net2 = mock(CyNetwork.class);
    n1.setNetworkPointer(net2);
    assertNotNull(n1.getNetworkPointer());
    assertEquals(net2, n1.getNetworkPointer());

    // now put a null network to verify that we've "unset" things
    n1.setNetworkPointer(null);
    assertNull(n1.getNetworkPointer());
  }
 // by default a node should have a null nested network
 @Test
 public void testInitGetNestedNetwork() {
   CyNode n1 = net.addNode();
   assertNull(n1.getNetworkPointer());
 }