@Test
public void givenUsingCustomSerializer_whenChangingNameOfFieldOnSerializing_thenCorrect() {
final SourceClass sourceObject = new SourceClass(7, "seven");
final GsonBuilder gsonBuildr = new GsonBuilder();
gsonBuildr.registerTypeAdapter(SourceClass.class, new DifferentNameSerializer());
final String jsonString = gsonBuildr.create().toJson(sourceObject);
final String expectedResult = "{\"otherIntValue\":7,\"otherStringValue\":\"seven\"}";
assertEquals(expectedResult, jsonString);
}