MessageCriteria criteria = new MessageCriteria();
criteria.setDirection(Direction.TO_CONNECTIONS);
criteria.addStatus(Message.STATUS_FAILED);
criteria.addStatus(Message.STATUS_RETRYING);
store.updateStatus(criteria, Message.STATUS_PROCESSED);
BasicDBObject obj = (BasicDBObject) applicationsCol.findOne();
Assert.assertNotNull(obj);
Assert.assertEquals( (byte) obj.getInt("status"), Message.STATUS_FAILED);