@Test
public void testObtainPublicNetworkSeveralExternalNetworks() throws OpenStackException {

    String CONTENT_NETWORKS = "{\"networks\": [{\"status\": \"ACTIVE\", "
            + "\"subnets\": [\"eb602a2b-13cd-46c8-9055-99ad45180730\"],"
            + "\"name\": \"net04_ext\", \"provider:physical_network\": null, "
            + "\"admin_state_up\": true, \"tenant_id\": "
            + "\"eab8403e83e048719ab220353c10806f\", \"provider:network_type\": "
            + "\"gre\", \"router:external\": true, \"shared\": "
            + "true, \"id\": \"04c9aedf-aeb6-4553-8ddb-845701da71bd\", " + "\"provider:segmentation_id\": 3}, "
            + "{\"status\": \"ACTIVE\", \"subnets\": [\"6ba86d6b-b7ad-4d0b-b552-cb63b36c9ef2\"], "
            + "\"name\": \"sec_ext_net\", "
            + "\"provider:physical_network\": \"physnet1\", \"admin_state_up\": true, \"tenant_id\":"
            + "\"eab8403e83e048719ab220353c10806f\", "
            + "\"provider:network_type\": \"flat\", \"router:external\": true, \"shared\": false,"
            + " \"id\": \"063f1075-77eb-45f9-be7a-205a591840ee\"," + "\"provider:segmentation_id\": null}]}";
    System.out.print(CONTENT_NETWORKS);
    String region = "RegionOne5";
    OpenStackAccess openStackAccess = new OpenStackAccess();
    openStackAccess.setToken("1234567891234567989");
    openStackAccess.setTenantId("08bed031f6c54c9d9b35b42aa06b51c0");
    when(openStackRegion.getTokenAdmin()).thenReturn(openStackAccess);
    when(openOperationUtil.executeNovaRequest(any(HttpUriRequest.class))).thenReturn(CONTENT_NETWORKS);
    // when
    String net = openStackUtil.getPublicAdminNetwork(paasManagerUser, region);
    // then
    assertNotNull(net);
    assertEquals(net, "04c9aedf-aeb6-4553-8ddb-845701da71bd");
}