JsonLdRetriever { public static List getSchema(Tool tool) { List schemaObjects = new ArrayList(); if (tool != null) { String defaultVersion = tool.getDefaultVersion(); String descriptorJson = getDescriptorJson(tool, defaultVersion); String schemaVariable = getSchemaVariable(descriptorJson); if (!schemaVariable.isEmpty()) { Map<String, Object> map = cwlJson2Map(descriptorJson, schemaVariable); map = addContext(map, schemaVariable); map = stripNamespace(map, schemaVariable); schemaObjects = getSchemaObjectsList(map); } } return schemaObjects; } private  JsonLdRetriever(); static List getSchema(Tool tool);  }
@Test public void getSchemaHasSchema() throws Exception { getSchema("schema.cwl", "schema.json"); }
@Test public void getSchemaNoSchema() throws Exception { getSchema("noSchema.cwl", "noSchema.json"); }