CodeContext implements JsonSerializable { private CodeContext(Builder builder) { this.pre = builder.pre != null ? unmodifiableList(new ArrayList<>(builder.pre)) : null; this.post = builder.post != null ? unmodifiableList(new ArrayList<>(builder.post)) : null; } private  CodeContext(Builder builder); List<String> getPre(); List<String> getPost(); @Override Object asJson(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void shouldBeEqual() { CodeContext codeContext1 = Factory.codeContext(); CodeContext codeContext2 = Factory.codeContext(); assertThat(codeContext2, is(codeContext1)); }