diff --git a/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/RmiOutboundGatewayTests.java b/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/RmiOutboundGatewayTests.java index fb9dc2e7ce..85e77acba1 100644 --- a/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/RmiOutboundGatewayTests.java +++ b/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/RmiOutboundGatewayTests.java @@ -30,9 +30,7 @@ import org.springframework.integration.MessageHandlingException; import org.springframework.integration.channel.QueueChannel; import org.springframework.integration.core.GenericMessage; import org.springframework.integration.core.MessageBuilder; -import org.springframework.integration.core.StringMessage; import org.springframework.integration.gateway.RequestReplyExchanger; -import org.springframework.integration.rmi.RmiOutboundGateway; import org.springframework.remoting.RemoteLookupFailureException; import org.springframework.remoting.rmi.RmiServiceExporter; @@ -63,7 +61,7 @@ public class RmiOutboundGatewayTests { @Test public void serializablePayload() throws RemoteException { - gateway.handleMessage(new StringMessage("test")); + gateway.handleMessage(new GenericMessage("test")); Message replyMessage = output.receive(0); assertNotNull(replyMessage); assertEquals("TEST", replyMessage.getPayload()); @@ -101,7 +99,7 @@ public class RmiOutboundGatewayTests { RmiOutboundGateway gateway = new RmiOutboundGateway("rmi://localhost:1099/noSuchService"); boolean exceptionThrown = false; try { - gateway.handleMessage(new StringMessage("test")); + gateway.handleMessage(new GenericMessage("test")); } catch (MessageHandlingException e) { assertEquals(RemoteLookupFailureException.class, e.getCause().getClass()); @@ -115,7 +113,7 @@ public class RmiOutboundGatewayTests { RmiOutboundGateway gateway = new RmiOutboundGateway("rmi://noSuchHost:1099/testRemoteHandler"); boolean exceptionThrown = false; try { - gateway.handleMessage(new StringMessage("test")); + gateway.handleMessage(new GenericMessage("test")); } catch (MessageHandlingException e) { assertEquals(RemoteLookupFailureException.class, e.getCause().getClass()); @@ -129,7 +127,7 @@ public class RmiOutboundGatewayTests { RmiOutboundGateway gateway = new RmiOutboundGateway("invalid"); boolean exceptionThrown = false; try { - gateway.handleMessage(new StringMessage("test")); + gateway.handleMessage(new GenericMessage("test")); } catch (MessageHandlingException e) { assertEquals(RemoteLookupFailureException.class, e.getCause().getClass()); diff --git a/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParserTests.java b/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParserTests.java index bba7a8d7f1..53d299f32d 100644 --- a/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParserTests.java +++ b/spring-integration-rmi/src/test/java/org/springframework/integration/rmi/config/RmiOutboundGatewayParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2010 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,8 +26,8 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.integration.Message; import org.springframework.integration.channel.QueueChannel; +import org.springframework.integration.core.GenericMessage; import org.springframework.integration.core.MessageChannel; -import org.springframework.integration.core.StringMessage; import org.springframework.integration.rmi.RmiInboundGateway; /** @@ -53,7 +53,7 @@ public class RmiOutboundGatewayParserTests { ApplicationContext context = new ClassPathXmlApplicationContext( "rmiOutboundGatewayParserTests.xml", this.getClass()); MessageChannel localChannel = (MessageChannel) context.getBean("localChannel"); - localChannel.send(new StringMessage("test")); + localChannel.send(new GenericMessage("test")); Message result = testChannel.receive(1000); assertNotNull(result); assertEquals("test", result.getPayload()); @@ -64,7 +64,7 @@ public class RmiOutboundGatewayParserTests { ApplicationContext context = new ClassPathXmlApplicationContext( "rmiOutboundGatewayParserTests.xml", this.getClass()); MessageChannel localChannel = (MessageChannel) context.getBean("localChannel"); - localChannel.send(new StringMessage("test")); + localChannel.send(new GenericMessage("test")); Message result = testChannel.receive(1000); assertNotNull(result); assertEquals("test", result.getPayload());