### Question:
NetworkHandler extends BaseHandler implements INeutronNetworkAware { @Override public int canCreateNetwork(NeutronNetwork network) { if (network.isShared()) { logger.error(" Network shared attribute not supported "); return HttpURLConnection.HTTP_NOT_ACCEPTABLE; } return HttpURLConnection.HTTP_CREATED; }  @Override int canCreateNetwork(NeutronNetwork network); @Override void neutronNetworkCreated(NeutronNetwork network); @Override int canUpdateNetwork(NeutronNetwork delta,
                                NeutronNetwork original); @Override void neutronNetworkUpdated(NeutronNetwork network); @Override int canDeleteNetwork(NeutronNetwork network); @Override void neutronNetworkDeleted(NeutronNetwork network);  }### Answer:
@Test public void testCanCreateNetwork() throws Exception { NeutronNetwork mockNet = mock(NeutronNetwork.class); when(mockNet.isShared()) .thenReturn(true) .thenReturn(false); assertEquals(HttpURLConnection.HTTP_NOT_ACCEPTABLE, testNetworkHandler.canCreateNetwork(mockNet)); assertEquals(HttpURLConnection.HTTP_CREATED, testNetworkHandler.canCreateNetwork(mockNet)); }