@Test
public void testGetAttachmentUsages() throws Exception {

    AttachmentUsage usage1 = createUsage("p1", "r1", "a11");
    AttachmentUsage usage2 = createUsage("p1", "r1", "a12");
    AttachmentUsage usage3 = createUsage("p2", "r2", "a21");
    AttachmentUsage usage4 = createUsage("p3", "r1", "a11");
    AttachmentUsage usage5 = createUsage("p4", "r1", "a11");
    handler.makeAttachmentUsages(Lists.newArrayList(usage1, usage2, usage3, usage4, usage5));
    Assert.assertThat(handler.getAttachmentUsages(Source.releaseId("r1"), "a11", null),
            Matchers.containsInAnyOrder(usage1, usage4, usage5));
}