Package org.jboss.as.clustering.web

Examples of org.jboss.as.clustering.web.OutgoingAttributeGranularitySessionData


    @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");
View Full Code Here


    @Test
    public void storeNull() throws IOException {
        @SuppressWarnings("unchecked")
        Map<Object, Object> map = mock(Map.class);
        OutgoingAttributeGranularitySessionData data = mock(OutgoingAttributeGranularitySessionData.class);

        when(data.getModifiedSessionAttributes()).thenReturn(null);
        when(data.getRemovedSessionAttributes()).thenReturn(null);

        this.storage.store(map, data);

        verifyZeroInteractions(map);
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.clustering.web.OutgoingAttributeGranularitySessionData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.