### Question:
MsoNeutronUtils extends MsoCommonUtils { public NetworkInfo queryNetwork(String networkNameOrId, String tenantId, String cloudSiteId) throws MsoException { logger.debug("In queryNetwork"); CloudSite cloudSite = cloudConfig.getCloudSite(cloudSiteId).orElseThrow(() -> new MsoCloudSiteNotFound(cloudSiteId)); Quantum neutronClient = getNeutronClient(cloudSite, tenantId); try { Network network = findNetworkByNameOrId(neutronClient, networkNameOrId); if (network == null) { logger.debug("Query Network: {} not found in tenant {}", networkNameOrId, tenantId); return null; } return new NetworkInfoMapper(network).map(); } catch (OpenStackBaseException e) { MsoException me = neutronExceptionToMsoException(e, "QueryNetwork"); throw me; } catch (RuntimeException e) { MsoException me = runtimeExceptionToMsoException(e, "QueryNetwork"); throw me; } }  NetworkInfo createNetwork(String cloudSiteId, String tenantId, NetworkType type, String networkName,
            String provider, List<Integer> vlans); NetworkInfo queryNetwork(String networkNameOrId, String tenantId, String cloudSiteId); Optional<Port> getNeutronPort(String neutronPortId, String tenantId, String cloudSiteId); boolean deleteNetwork(String networkId, String tenantId, String cloudSiteId); NetworkInfo updateNetwork(String cloudSiteId, String tenantId, String networkId, NetworkType type,
            String provider, List<Integer> vlans); Network findNetworkByNameOrId(Quantum neutronClient, String networkNameOrId); Network findNetworkByName(Quantum neutronClient, String networkName);  }### Answer:
@Test public void queryNetworkTest() throws Exception { StubOpenStack.mockOpenStackGetNeutronNetwork(wireMockServer, "GetNeutronNetwork.json", "43173f6a-d699-414b-888f-ab243dda6dfe"); NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId", "MTN13"); Assert.assertEquals("net1", networkInfo.getName()); }
@Test public void queryNetworkTest_404() throws Exception { NetworkInfo networkInfo = msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId", "MTN13"); Assert.assertNull(networkInfo); }
@Test public void queryNetworkTest_500() throws Exception { expectedException.expect(MsoException.class); StubOpenStack.mockOpenStackGetNeutronNetwork_500(wireMockServer, "43173f6a-d699-414b-888f-ab243dda6dfe"); msoNeutronUtils.queryNetwork("43173f6a-d699-414b-888f-ab243dda6dfe", "tenantId", "MTN13"); }