diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-07-29 13:51:51 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-07-29 13:51:51 +0000 |
| commit | 242b0827d0ff650b973775e47786018372ae4fea (patch) | |
| tree | ba11c482dce3b6639b0fd07e325a4aa5a0b835e1 /qpid/java/broker-plugins | |
| parent | 37869a918a9747758bf78f918036acfc610d06a3 (diff) | |
| download | qpid-python-242b0827d0ff650b973775e47786018372ae4fea.tar.gz | |
QPID-5937 : [Java Broker] Add parameters to REST servlet to allow return of actual vs. effective attribute values
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1614353 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker-plugins')
| -rw-r--r-- | qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java index 39e8ff6185..011b7b995d 100644 --- a/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java +++ b/qpid/java/broker-plugins/management-http/src/test/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverterTest.java @@ -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 ConfiguredObjectToMapConverterTest extends TestCase 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 ConfiguredObjectToMapConverterTest extends TestCase 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); |
