### Question:
Cypher { public static <T> Literal<T> literalOf(Object object) { if (object == null) { return (Literal<T>) NullLiteral.INSTANCE; } if (object instanceof CharSequence) { return (Literal<T>) new StringLiteral((CharSequence) object); } if (object instanceof Number) { return (Literal<T>) new NumberLiteral((Number) object); } if (object instanceof Iterable) { for (Object element : ((Iterable<?>) object)) { if (!(element instanceof Literal)) { throw new IllegalArgumentException("Unsupported literal type in iterable: " + element.getClass()); } } @SuppressWarnings("unchecked") ListLiteral listLiteral = new ListLiteral((Iterable<Literal<?>>) object); return (Literal<T>) listLiteral; } if (object instanceof Boolean) { return (Literal<T>) BooleanLiteral.of((Boolean) object); } throw new IllegalArgumentException("Unsupported literal type: " + object.getClass()); } private  Cypher(); static Node node(String primaryLabel, String... additionalLabels); static Node node(String primaryLabel, List<String> additionalLabels); static Node node(String primaryLabel, MapExpression properties, String... additionalLabels); static Node anyNode(); static Asterisk asterisk(); static Node anyNode(String symbolicName); static Node anyNode(SymbolicName symbolicName); static Property property(String containerName, String name); static Property property(Expression expression, String name); static NamedPath.OngoingDefinitionWithName path(String name); static NamedPath.OngoingDefinitionWithName path(SymbolicName name); static NamedPath.OngoingShortestPathDefinitionWithName shortestPath(String name); static NamedPath.OngoingShortestPathDefinitionWithName shortestPath(SymbolicName name); static SymbolicName name(String value); static Parameter parameter(String name); static StatementBuilder.OngoingReadingWithoutWhere optionalMatch(PatternElement... pattern); static StatementBuilder.OngoingReadingWithoutWhere match(PatternElement... pattern); static T create(
		PatternElement... pattern); static StatementBuilder.OrderableOngoingReadingAndWith with(AliasedExpression... expressions); static T merge(
		PatternElement... pattern); static StatementBuilder.OngoingUnwind unwind(Expression expression); static StatementBuilder.OngoingUnwind unwind(Expression... expressions); static SortItem sort(Expression expression); static MapExpression mapOf(Object... keysAndValues); static ListExpression listOf(Expression... expressions); static Literal<T> literalOf(Object object); static Literal<Boolean> literalTrue(); static Literal<Boolean> literalFalse(); static Statement union(Statement... statement); static Statement unionAll(Statement... statement); static StatementBuilder.OngoingReadingAndReturn returning(Expression... expressions); static OngoingDefinitionWithPattern listBasedOn(RelationshipPattern relationshipPattern); static OngoingDefinitionWithPattern listBasedOn(NamedPath namedPath); static OngoingDefinitionWithVariable listWith(SymbolicName variable); static String quote(String unquotedString); static Case caseExpression(); static Case caseExpression(Expression expression); static OngoingStandaloneCallWithoutArguments call(String procedureName); static OngoingStandaloneCallWithoutArguments call(String... namespaceAndProcedure); static Expression subList(Expression targetExpression, Integer start, Integer end); static Expression subList(Expression targetExpression, Expression start, Expression end); static Expression subListFrom(Expression targetExpression, Integer start); static Expression subListFrom(Expression targetExpression, Expression start); static Expression subListUntil(Expression targetExpression, Integer end); static Expression subListUntil(Expression targetExpression, Expression end); static ListOperator valueAt(Expression targetExpression, Integer index); static ListOperator valueAt(Expression targetExpression, Expression index);  }### Answer:
@Test void shouldNotCreateIllegalLiterals() { assertThatIllegalArgumentException().isThrownBy(() -> Cypher.literalOf(new CypherTest())) .withMessageStartingWith("Unsupported literal type: "); }