### Question:
InstantSender implements EntrySender { public void performTreatment(List<ProcessedEntry> entries) { final List<Files> theContents = new ArrayList<Files>(); for (final ProcessedEntry anEntry : entries) { theContents.addAll(anEntry.getContents()); } for (final VObjectData aMember : this.recipients) { if (aMember.isCurrentlyRecipient()) { sendServiceMessage(theContents, aMember); } } } InstantSender(List<VObjectData> recipients, MessageSignature signature, String messageTitle); void performTreatment(List<ProcessedEntry> entries);  }### Answer:
@Test public void sendEntries() { final VObjectData o1 = VObjectData.getData(getBrewsterObject()); final VObjectData o2 = VObjectData.getData(getKowalskyObject()); final VObjectData o3 = VObjectData.getData(getPrivateObject()); final VObjectData o4 = VObjectData.createObject(ObjectType.RFID_NANOZTAG, "serial", "label", o1.getOwner(), "location"); final List<Files> allTheContents = new ArrayList<Files>(); final List<ProcessedEntry> theEntries = new ArrayList<ProcessedEntry>(); for (int i = 0; i < 2; i++) { final ProcessedEntry entry = getProcessedEntry("myTitle" + i, "file" + i + "-", 3); theEntries.add(entry); allTheContents.addAll(entry.getContents()); } final AtomicBoolean contentsAreOk = new AtomicBoolean(true); final List<VObjectData> theyReceivedMessage = new ArrayList<VObjectData>(); final InstantSender sender = new InstantSender(Arrays.asList(o1, o2, o3, o4), null, "funny title") { @Override protected void sendServiceMessage(List<Files> theContents, VObjectData member) { if (!theContents.equals(allTheContents)) { contentsAreOk.set(false); } theyReceivedMessage.add(member); } }; sender.performTreatment(theEntries); Assert.assertTrue(contentsAreOk.get()); Assert.assertEquals(Arrays.asList(o1, o2, o3), theyReceivedMessage); }