### Question:
MessageFactoryImpl extends RecordFactoryImpl<Message, MessageImpl> implements MessageFactory { public int walkInMessageReceivedOrArchivedByStatus(StatusMessage inStatus, User inUser, VObject inObject, int inSkip, int inGetCount, JoinRecordsWalker<Message, MessageReceived> inWalker) { String optional_condition = net.violet.common.StringShop.EMPTY_STRING; if (inObject != null) { optional_condition = " and object.object_id = " + inObject.getId(); } final String condition = " object.object_owner = ? " + optional_condition + " and messenger.object_id=object.object_id and message_received.recipient_id=messenger.id and message_received.message_state= ? and message.id=message_received.message_id "; final String[] inJoinTables = new String[] { "messenger", "object" }; return walk(MessageReceivedImpl.SPECIFICATION, condition, Arrays.asList((Object) inUser.getId(), inStatus.name()), inJoinTables, "timeOfDelivery DESC", 0 , inSkip, inGetCount, inWalker); } MessageFactoryImpl(); Message findByEventID(long inId); boolean usesFiles(Files inFile); long countMessageReceivedOrArchivedByStatus(StatusMessage inStatus, User inUser, VObject inObject); long countMessageSent(User inUser); int walkInMessageReceivedOrArchivedByStatus(StatusMessage inStatus, User inUser, VObject inObject, int inSkip, int inGetCount, JoinRecordsWalker<Message, MessageReceived> inWalker); int walkInMessageReceived(VObject inObject, JoinRecordsWalker<Message, MessageReceived> inWalker); int walkInMessageSent(User inUser, int inSkip, int inGetCount, JoinRecordsWalker<Message, MessageSent> inWalker); Message create(Files inFile, String inText, CCalendar inTimeOfDelivery, Palette inPalette); Message findFirstMessageReceived(VObject inObject); Message findLastMessageReceived(VObject inObject); Message findByXMPPID(String theID);  }### Answer:
@Test public void walkInMessageArchived() { final User theUserReceived = Factories.USER.findByEmail("usermessagetest1@violet.net"); final VObject theObject = Factories.VOBJECT.find(63644); Assert.assertNotNull(theObject); Assert.assertEquals(2, Factories.MESSAGE.walkInMessageReceivedOrArchivedByStatus(StatusMessage.ARCHIVED, theUserReceived, null, 0, 10, new MessageImpl.JoinRecordsWalker<Message, MessageReceived>() { public void process(Message inMessage, MessageReceived inMessageReceived) { } })); Assert.assertEquals(2, Factories.MESSAGE.walkInMessageReceivedOrArchivedByStatus(StatusMessage.ARCHIVED, theUserReceived, theObject, 0, 10, new MessageImpl.JoinRecordsWalker<Message, MessageReceived>() { public void process(Message inMessage, MessageReceived inMessageReceived) { } })); }