@Override
   public List<Service> getServiceDefinitions() throws MockRepositoryImportException {
      List<Service> result = new ArrayList<>();

      // Build a new service.
      Service service = new Service();

      // Collection V2 as an info node.
      if (collection.has("info")) {
         isV2Collection = true;
         fillServiceDefinition(service);
      } else {
         throw new MockRepositoryImportException("Only Postman v2 Collection are supported.");
      }

      // Then build its operations.
      try {
         service.setOperations(extractOperations());
      } catch (Throwable t) {
         log.error("Runtime exception while extracting Operations for {}", service.getName());
         throw new MockRepositoryImportException("Runtime exception for " + service.getName() + ": " + t.getMessage());
      }

      result.add(service);
      return result;
   }
@Test
   void testTestAPIMalformedVersionImport() {
      PostmanCollectionImporter importer = null;
      try {
         importer = new PostmanCollectionImporter(
               "target/test-classes/io/github/microcks/util/postman/Test API bad version.postman_collection.json");
      } catch (IOException ioe) {
         fail("Exception should not be thrown");
      }
      // Check that basic service properties import fail because of missing version.
      boolean failure = false;
      List<Service> services = null;
      try {
         services = importer.getServiceDefinitions();
      } catch (MockRepositoryImportException e) {
         fail("Exception should not be thrown");
      }
      assertEquals(1, services.size());
      assertEquals("0.0.1-Description", services.get(0).getVersion());
   }