@Test
public void shouldCorrectlyWriteCode() {

    Code code = new Code("name");
    String expected = "{ \"$code\" : \"name\" }";
    String actual = writer.write(code);
    assertSame(expected, actual);
}