@Test
public void store() throws IOException {
@SuppressWarnings("unchecked")
Map<Object, Object> map = mock(Map.class);
OutgoingAttributeGranularitySessionData data = mock(OutgoingAttributeGranularitySessionData.class);
Map<String, Object> modifiedAttributes = Collections.singletonMap("key", (Object) "value");
Set<String> removedAttributes = Collections.singleton("removed");
Object marshalledAttribute = new Object();
when(data.getModifiedSessionAttributes()).thenReturn(modifiedAttributes);
when(this.marshaller.marshal("value")).thenReturn(marshalledAttribute);
when(data.getRemovedSessionAttributes()).thenReturn(removedAttributes);
this.storage.store(map, data);
verify(map).put(eq("key"), same(marshalledAttribute));
verify(map).remove("removed");