### Question:
ErrorHandler { public static ErrorHandler buildAsErrorHandler(final Builder<? extends Node> builder) { final Node handlerNode = builder.build(); return new ErrorHandler(handlerNode); } private  ErrorHandler(final Node handlerNode); static ErrorHandler buildAsErrorHandler(final Builder<? extends Node> builder); String getName(); Node getHandlerNode();  }### Answer:
@Test public void testIfThereAreParentsThenThrows() { final String name = "error-handler"; final Node parent = MapReduceActionBuilder.create().withName("parent").build(); final Builder<MapReduceAction> handlerBuilder = MapReduceActionBuilder.create() .withName(name) .withParent(parent); expectedException.expect(IllegalStateException.class); ErrorHandler.buildAsErrorHandler(handlerBuilder); }