### Question:
JsonSchemaInspector implements Inspector { @Override public List<String> getPaths(final String kind, final String type, final String specification, final Optional<byte[]> exemplar) { final JsonSchema schema; try { schema = JsonSchemaUtils.reader().readValue(specification); } catch (final IOException e) { LOG.warn("Unable to parse the given JSON schema, increase log level to DEBUG to see the schema being parsed", e); LOG.debug(specification); return Collections.emptyList(); } String context = null; final List<String> paths = new ArrayList<>(); ObjectSchema objectSchema; if (schema.isObjectSchema()) { objectSchema = schema.asObjectSchema(); } else if (schema.isArraySchema()) { objectSchema = getItemSchema(schema.asArraySchema()); paths.addAll(COLLECTION_PATHS); context = ARRAY_CONTEXT; } else { throw new IllegalStateException(String.format("Unexpected schema type %s - expected object or array schema", schema.getType())); } if (objectSchema != null) { final Map<String, JsonSchema> properties = objectSchema.getProperties(); fetchPaths(context, paths, properties); } return Collections.unmodifiableList(paths); }  @Override List<String> getPaths(final String kind, final String type, final String specification,
        final Optional<byte[]> exemplar); @Override boolean supports(final String kind, final String type, final String specification,
        final Optional<byte[]> exemplar);  }### Answer:
@Test public void shouldCollectPathsFromJsonSchema() throws IOException { final List<String> paths = inspector.getPaths(JSON_SCHEMA_KIND, "", IOStreams.readText(getSalesForceContactSchema()), Optional.empty()); assertSalesforceContactProperties(paths); assertThat(paths).doesNotContainAnyElementsOf(JsonSchemaInspector.COLLECTION_PATHS); }
@Test @Parameters({"/petstore-unified-schema.json", "/petstore-unified-schema-draft-4.json", "/petstore-unified-schema-draft-6.json"}) public void shouldCollectPathsFromUnifiedJsonSchema(final String schemaPath) throws IOException { final List<String> paths = inspector.getPaths(JSON_SCHEMA_KIND, "", IOStreams.readText(getPetstoreUnifiedSchema(schemaPath)), Optional.empty()); assertPetstoreProperties(paths); assertThat(paths).doesNotContainAnyElementsOf(JsonSchemaInspector.COLLECTION_PATHS); }
@Test public void shouldCollectPathsFromJsonArraysSchema() throws IOException { final List<String> paths = inspector.getPaths(JSON_SCHEMA_KIND, "", getSalesForceContactArraySchema(), Optional.empty()); assertSalesforceContactArrayProperties(paths); assertThat(paths).containsAll(JsonSchemaInspector.COLLECTION_PATHS); }