LegacyBdio1xEmitter extends LegacyJsonParserEmitter { @Override protected Object next(JsonParser jsonParser) throws IOException { Bdio1JsonParser jp = Bdio1JsonParser.create(jsonParser); if (metadata == null) { if (jp.nextToken() != null) { if (!jp.isExpectedStartArrayToken()) { throw JsonMappingException.from(jp, "expected start array"); } parseMetadata(jp); return metadata.asNamedGraph(); } } else { List<Map<String, Object>> graph = parseGraph(jp); if (!graph.isEmpty()) { return metadata.asNamedGraph(graph, JsonLdConsts.ID); } } return null; } LegacyBdio1xEmitter(InputStream inputStream);   }
@Test public void creationInfo_invalidSpecVersion() throws IOException { thrown.expect(IllegalArgumentException.class); InputStream inputStream = CharSource.wrap("" + "[ {" + " \"@id\" : \"http: + " \"@type\" : \"BillOfMaterials\"," + " \"specVersion\" : \"1.2.0\"" + "} ]").asByteSource(UTF_8).openStream(); new LegacyBdio1xEmitter(inputStream).stream().iterator().next(); }