### Question:
BoxedExpressionHelper { public HasExpression getHasExpression(final Node<View, Edge> node) { return getOptionalHasExpression(node).orElseThrow(UnsupportedOperationException::new); }  Optional<HasExpression> getOptionalHasExpression(final Node<View, Edge> node); Optional<Expression> getOptionalExpression(final Node<View, Edge> node); Expression getExpression(final Node<View, Edge> node); HasExpression getHasExpression(final Node<View, Edge> node);  }### Answer:
@Test public void testGetHasExpression() { final View content = mock(View.class); final Decision expected = mock(Decision.class); when(node.getContent()).thenReturn(content); when(content.getDefinition()).thenReturn(expected); final HasExpression actual = helper.getHasExpression(node); assertEquals(expected, actual); }
@Test(expected = UnsupportedOperationException.class) public void testGetHasExpressionWhenNodeDoesNotHaveExpression() { final View content = mock(View.class); when(node.getContent()).thenReturn(content); when(content.getDefinition()).thenReturn(new InputData()); helper.getHasExpression(node); }