public void testMethodCallMarashalFilter_shouldMarshalOutgoingMessage() throws Exception {
JsonOutgoingMethodCallMarshalFilter jsonOutgoingMethodCallMarshalFilter =
new JsonOutgoingMethodCallMarshalFilter();
FilterAction mock = mock(FilterAction.class);
when(mock.filter(any(MethodCallMessage.class), any(Map.class))).thenReturn(RESULT_MESSAGE);
when(mock.getSupportedInputType()).thenAnswer(new Returns(String.class));
when(mock.getSupportedOutputType()).thenAnswer(new Returns(String.class));
jsonOutgoingMethodCallMarshalFilter.setNext(mock);
MethodResultMessage result =
(MethodResultMessage) jsonOutgoingMethodCallMarshalFilter.filter(new MethodCallMessage(),
new HashMap<String, Object>());
Object arg = result.getResult().getArg();