Assert.assertNotNull(amp);
Assert.assertEquals(amp.getStatus(), Rule.Action.ERROR);
Assert.assertEquals(amp.getTo(), Jid.valueOf("bernardo@hamlet.lit/elsinore"));
Assert.assertEquals(amp.getRules().size(), 1);
Assert.assertTrue(message.getError().getExtension() instanceof FailedRules);
FailedRules failedRules = (FailedRules) (message.getError().getExtension());
Assert.assertEquals(failedRules.getRules().size(), 1);
Assert.assertEquals(failedRules.getRules().get(0).getAction(), Rule.Action.ERROR);
Assert.assertEquals(failedRules.getRules().get(0).getCondition(), Rule.Condition.DELIVER);
Assert.assertEquals(failedRules.getRules().get(0).getValue(), "stored");
}