   @Test
   public void testImportRepository(){

      // Setup and export result.
      String json = "{\"services\":[{\"name\":\"Imp1\",\"version\":\"1.2\",\"xmlNS\":null,\"type\":null,\"operations\":[],\"id\":25638445759706201468670970602},"
            + "{\"name\":\"Imp2\",\"version\":\"1.1\",\"xmlNS\":null,\"type\":null,\"operations\":[],\"id\":25638445759706201468670970603}], "
            + "\"resources\":[{\"name\":\"Resource 1\",\"content\":\"<wsdl></wsdl>\",\"type\":\"WSDL\",\"serviceId\":25638445759706201468670970602,\"id\":25638445759706201468670970605}], "
            + "\"requests\":[], \"responses\":[]}";

      boolean result = service.importRepository(json);

      // Get imported service and assert on content.
      Service service = repository.findByNameAndVersion("Imp1", "1.2");
      assertNotNull(service);
      assertEquals("Imp1", service.getName());
      assertEquals("1.2", service.getVersion());
      assertEquals("25638445759706201468670970602", service.getId().toString());

      // Get imported resources and assert on content.
      List<Resource> resources = resourceRepository.findByServiceId(service.getId());
      assertEquals(1, resources.size());
      assertEquals("Resource 1", resources.get(0).getName());
      assertEquals("<wsdl></wsdl>", resources.get(0).getContent());
      assertEquals(ResourceType.WSDL, resources.get(0).getType());
   }