@Test public void getGenerator_withReferenceAndTemplate_throwsRuntimeException() throws Exception { TermGeneratorCreator tgc = new TermGeneratorCreator(null, "foo", null, TemplateParser.build(), null); RuntimeException exception = assertThrows(RuntimeException.class, () -> tgc.getObjectGenerator(new CarmlObjectMap("foo.bar", null, "foo{foo.bar}", TermType.LITERAL, null, null, null, null))); Assert.assertNotNull(exception); Assert.assertTrue(exception.getMessage().startsWith("2 value generators were created for term map")); }
@SuppressWarnings("unchecked") TermGenerator<Value> getObjectGenerator(ObjectMap map) { return (TermGenerator<Value>) getGenerator( map, ImmutableSet.of(TermType.IRI, TermType.BLANK_NODE, TermType.LITERAL), ImmutableSet.of(IRI.class, Literal.class) ); }
TermGeneratorCreator { @SuppressWarnings("unchecked") TermGenerator<Value> getObjectGenerator(ObjectMap map) { return (TermGenerator<Value>) getGenerator( map, ImmutableSet.of(TermType.IRI, TermType.BLANK_NODE, TermType.LITERAL), ImmutableSet.of(IRI.class, Literal.class) ); } }
TermGeneratorCreator { @SuppressWarnings("unchecked") TermGenerator<Value> getObjectGenerator(ObjectMap map) { return (TermGenerator<Value>) getGenerator( map, ImmutableSet.of(TermType.IRI, TermType.BLANK_NODE, TermType.LITERAL), ImmutableSet.of(IRI.class, Literal.class) ); } TermGeneratorCreator(
		ValueFactory valueFactory,
		String baseIri,
		Function<String, String> makeIriSafe,
		TemplateParser templateParser,
		RmlMapper mapper
	); }
TermGeneratorCreator { @SuppressWarnings("unchecked") TermGenerator<Value> getObjectGenerator(ObjectMap map) { return (TermGenerator<Value>) getGenerator( map, ImmutableSet.of(TermType.IRI, TermType.BLANK_NODE, TermType.LITERAL), ImmutableSet.of(IRI.class, Literal.class) ); } TermGeneratorCreator(
		ValueFactory valueFactory,
		String baseIri,
		Function<String, String> makeIriSafe,
		TemplateParser templateParser,
		RmlMapper mapper
	);  }
TermGeneratorCreator { @SuppressWarnings("unchecked") TermGenerator<Value> getObjectGenerator(ObjectMap map) { return (TermGenerator<Value>) getGenerator( map, ImmutableSet.of(TermType.IRI, TermType.BLANK_NODE, TermType.LITERAL), ImmutableSet.of(IRI.class, Literal.class) ); } TermGeneratorCreator(
		ValueFactory valueFactory,
		String baseIri,
		Function<String, String> makeIriSafe,
		TemplateParser templateParser,
		RmlMapper mapper
	);   }