- Assert.assertEquals("Wrong action type", Output.class, action1.getType());
- Assert.assertEquals("Wrong action port", 1, action1.getAugmentation(PortAction.class)
- .getPort().getValue().intValue());
- Assert.assertEquals("Wrong action port", 2, action1.getAugmentation(MaxLengthAction.class)
- .getMaxLength().intValue());
+ Assert.assertTrue("Wrong action type", action1.getActionChoice() instanceof OutputActionCase);
+ Assert.assertEquals("Wrong action port", 1, ((OutputActionCase) action1.getActionChoice())
+ .getOutputAction().getPort().getValue().intValue());
+ Assert.assertEquals("Wrong action port", 2, ((OutputActionCase) action1.getActionChoice())
+ .getOutputAction().getMaxLength().intValue());