diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java index e84874d913..1a016683a2 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/management/QueueControlUsingCoreTest.java @@ -195,7 +195,14 @@ public class QueueControlUsingCoreTest extends QueueControlTest */ public Long getFirstMessageAge() throws Exception { - return (Long) proxy.invokeOperation("getFirstMessageAge"); + Object value = proxy.invokeOperation("getFirstMessageAge"); + + if (value instanceof Integer) + { + return ((Integer) value).longValue(); + } + + return (Long) value; } public String listMessageCounterHistoryAsHTML() throws Exception