@Test
public void testUpdateAttachmentUsage() throws Exception {

    AttachmentUsage usage1 = new AttachmentUsage();
    usage1.setOwner(Source.projectId("r1"));
    usage1.setUsedBy(Source.projectId("p1"));
    usage1.setAttachmentContentId("a1");
    handler.makeAttachmentUsage(usage1);
    usage1.setUsageData(UsageData.licenseInfo(new LicenseInfoUsage(Sets.newHashSet("l1", "l2"))));
    handler.updateAttachmentUsage(usage1);
    Assert.assertThat(handler.getAttachmentUsage(usage1.getId()), is(usage1));
}