diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/json/OutboundJsonMessageMapperTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/json/OutboundJsonMessageMapperTests.java index 30cd94499a..0228295a73 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/json/OutboundJsonMessageMapperTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/json/OutboundJsonMessageMapperTests.java @@ -1,3 +1,19 @@ +/* + * 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. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.integration.json; import static org.junit.Assert.*; @@ -13,7 +29,10 @@ import org.junit.Test; import org.springframework.integration.core.Message; import org.springframework.integration.message.MessageBuilder; - +/** + * @author Jeremy Grelle + * @since 2.0 + */ public class OutboundJsonMessageMapperTests { private JsonFactory jsonFactory = new JsonFactory(); @@ -24,7 +43,7 @@ public class OutboundJsonMessageMapperTests { Message testMessage = MessageBuilder.withPayload("myPayloadStuff").build(); OutboundJsonMessageMapper mapper = new OutboundJsonMessageMapper(); String result = mapper.fromMessage(testMessage); - assertTrue(result.startsWith("{\"headers\":{")); + assertTrue(result.contains("\"headers\":{")); assertTrue(result.contains("\"$timestamp\":"+testMessage.getHeaders().getTimestamp())); assertTrue(result.contains("\"$history\":[]")); assertTrue(result.contains("\"$id\":\""+testMessage.getHeaders().getId()+"\"")); @@ -47,7 +66,7 @@ public class OutboundJsonMessageMapperTests { Message testMessage = MessageBuilder.withPayload(payload).build(); OutboundJsonMessageMapper mapper = new OutboundJsonMessageMapper(); String result = mapper.fromMessage(testMessage); - assertTrue(result.startsWith("{\"headers\":{")); + assertTrue(result.contains("\"headers\":{")); assertTrue(result.contains("\"$timestamp\":"+testMessage.getHeaders().getTimestamp())); assertTrue(result.contains("\"$history\":[]")); assertTrue(result.contains("\"$id\":\""+testMessage.getHeaders().getId()+"\""));