code: private void addNonPartialsToResources(final File dir, final Resource resource) throws CodeGenException {
          if (dir.equals(null)) {
              throw new CodeGenException("Could not read from directory " + dir.getPath());
          }
          final File[] files = dir.listFiles();
          if (files == null) {
              return;
          }
          for(File entry : files) {
              try {
                  if (entry.isDirectory()) {
                      addNonPartialsToResources(entry, resource);
                  } else if (entry.getName().endsWith(".json") && ProctorUtils.readJsonFromFile(entry).has("tests")) {
                      resource.addInclude(entry.getPath().substring(getTopDirectory().getPath().length() + 1));
                  }
              } catch (IOException e) {
                  throw new CodeGenException("Could not read from file " + entry.getName(),e);
              }
  
          }
      }
docs: /*
  Adds any non partial specifications to resources