assertEquals(expectedResult, jsonString);
}
@Test
public void givenCollection_whenSerializing_thenCorrect() {
final Collection<SourceClass> sourceCollection = Lists.newArrayList(new SourceClass(1, "one"), new SourceClass(2, "two"));
final String jsonCollection = new Gson().toJson(sourceCollection);
final String expectedResult = "[{\"intValue\":1,\"stringValue\":\"one\"},{\"intValue\":2,\"stringValue\":\"two\"}]";
assertEquals(expectedResult, jsonCollection);
}