### Question:
DelegateShapeFactory extends AbstractShapeFactory<W, S> { @Override @SuppressWarnings("unchecked") public S newShape(final W definition) { final DefinitionTypeBindings bindings = getBindings(definition.getClass()); final ShapeDef<? extends W> shapeDef = bindings.shapeDef; return (S) bindings.factory.get() .newShape(definition, shapeDef); } DelegateShapeFactory(); DelegateShapeFactory<W, S> delegate(final Class<? extends W> definitionType,
                                               final ShapeDef<? extends W> shapeDef,
                                               final Supplier<? extends ShapeDefFactory> factory); @Override @SuppressWarnings("unchecked") S newShape(final W definition); @PreDestroy void destroy();  }### Answer:
@Test(expected = RuntimeException.class) @SuppressWarnings("unchecked") public void testNoBindingFound() { tested.newShape(definition1); }