@Test
public void testUpdateAttachmentsFromRequestIdsAreNull() {

    PortletRequest request = Mockito.mock(PortletRequest.class);
    new TestUserCacheHolder().enable();
    Set<Attachment> documentAttachments = ImmutableSet.of(); // use immutable set to ensure that set is not changed.
    assertThat(PortletUtils.updateAttachmentsFromRequest(request, documentAttachments), is(empty()));
}