when(txaction.getAttachments()).thenReturn(ImmutableSet.of(attachment));
}
@Test
public void itHasAnAttachment() throws Exception {
final XmlsonObject representation = presenter.present(txaction, Locale.UK);
final XmlsonArray attachments = (XmlsonArray) representation.get("attachments");
assertThat(attachments.getMembers().size(), is(1));
final XmlsonObject attachment = (XmlsonObject) attachments.getMembers().get(0);
assertThat(attachment, is(attachmentRepresentation));
verify(attachmentPresenter).present(this.attachment);
}