### Question:
ShapeDefFunctionalFactory implements ShapeDefFactory<W, D, S> { @Override @SuppressWarnings("unchecked") public S newShape(final W instance, final D shapeDef) { return (S) newShape(instance, shapeDef, shapeDef.getType()); }  @SuppressWarnings("unchecked") ShapeDefFunctionalFactory<W, D, S> set(final Class<? extends D> shapeDefType,
                                                  final BiFunction<W, D, S> shapeBuilderFunction); @Override @SuppressWarnings("unchecked") S newShape(final W instance,
                      final D shapeDef); @PreDestroy void destroy();  }### Answer:
@Test(expected = RuntimeException.class) @SuppressWarnings("unchecked") public void testNoDefinitionRegistered() { this.tested.newShape(definitionBean, shapeDef1); }