PNComputationUnit implements AutoCloseable { @Override public void close() throws Exception { if ( null != physicalNodeChangeListenerReg ) { physicalNodeChangeListenerReg.close(); } if ( null != physicalLinkChangeListenerReg ) { physicalLinkChangeListenerReg.close(); } if ( null != physicalPathChangeListenerReg ) { physicalPathChangeListenerReg.close(); } return; } PNComputationUnit(DataBroker dataBroker); @Override void close();  }
@Test public void testClose() throws Exception { pnComputationUnit.close(); Assert.assertNotNull(pnComputationUnit); verify(pnComputationUnit).close(); }