You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/07/29 15:51:52 UTC

svn commit: r1614353 - /qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java

Author: rgodfrey
Date: Tue Jul 29 13:51:51 2014
New Revision: 1614353

URL: http://svn.apache.org/r1614353
Log:
QPID-5937 : [Java Broker] Add parameters to REST servlet to allow return of actual vs. effective attribute values

Modified:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java?rev=1614353&r1=1614352&r2=1614353&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java Tue Jul 29 13:51:51 2014
@@ -20,6 +20,7 @@
 package org.apache.qpid.server.management.plugin.servlet.rest;
 
 import static org.apache.qpid.server.management.plugin.servlet.rest.ConfiguredObjectToMapConverter.STATISTICS_MAP_KEY;
+import static org.mockito.Matchers.anyBoolean;
 import static org.mockito.Matchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -136,7 +137,7 @@ public class ConfiguredObjectToMapConver
         when(_configuredObject.getAttributeNames()).thenReturn(Collections.singletonList(ConfiguredObject.CONTEXT));
         when(_configuredObject.getContextValue(eq(String.class), eq("key"))).thenReturn("value");
         when(_configuredObject.getContextValue(eq(String.class),eq("inheritedkey"))).thenReturn("foo");
-        when(_configuredObject.getContextKeys(false)).thenReturn(inheritedKeys);
+        when(_configuredObject.getContextKeys(anyBoolean())).thenReturn(inheritedKeys);
         when(_configuredObject.getContext()).thenReturn(actualContext);
         when(mockChild.getAttributeNames()).thenReturn(Arrays.asList(childAttributeName, ConfiguredObject.CONTEXT));
         when(mockChild.getAttribute(childAttributeName)).thenReturn(childAttributeValue);
@@ -161,7 +162,7 @@ public class ConfiguredObjectToMapConver
         Map<String, Object> inheritedContext = new HashMap<>();
         inheritedContext.put("key","value");
         inheritedContext.put("inheritedkey","foo");
-        assertEquals("Incorrect context", resultMap.get(ConfiguredObject.CONTEXT), inheritedContext);
+        assertEquals("Incorrect context", inheritedContext, resultMap.get(ConfiguredObject.CONTEXT));
         childList = (List<Map<String, Object>>) resultMap.get("testchilds");
         assertEquals("Unexpected number of children", 1, childList.size());
         childMap = childList.get(0);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org