### Question:
AssignNetwork { public boolean networkFoundByName(BuildingBlockExecution execution) { try { L3Network l3network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); if (!OrchestrationStatus.PRECREATED.equals(l3network.getOrchestrationStatus())) { logger.debug("network found in NOT PRECREATED status"); return true; } } catch (Exception ex) { return false; } return false; }  boolean networkFoundByName(BuildingBlockExecution execution);  }### Answer:
@Test public void networkNotFoundTest() throws Exception { try { network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); } catch (BBObjectNotFoundException e) { } network.setOrchestrationStatus(OrchestrationStatus.PRECREATED); boolean networkFound = assignNetwork.networkFoundByName(execution); assertEquals(false, networkFound); }
@Test public void networkFoundTest() throws Exception { try { network = extractPojosForBB.extractByKey(execution, ResourceKey.NETWORK_ID); } catch (BBObjectNotFoundException e) { } boolean networkFound = assignNetwork.networkFoundByName(execution); assertEquals(true, networkFound); }