### Question:
FieldLineageInfo { public Set<Operation> getOperations() { return operations; } FieldLineageInfo(Collection<? extends Operation> operations);  FieldLineageInfo(Collection<? extends Operation> operations, boolean computeSummaries); long getChecksum(); Set<Operation> getOperations(); Map<EndPoint, Set<String>> getDestinationFields(); Map<EndPointField, Set<EndPointField>> getIncomingSummary(); Map<EndPointField, Set<EndPointField>> getOutgoingSummary(); Set<EndPoint> getSources(); Set<EndPoint> getDestinations(); static List<Operation> getTopologicallySortedOperations(Set<Operation> operations); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testValidOperations() { ReadOperation read = new ReadOperation("read", "some read", EndPoint.of("endpoint1"), "offset", "body"); TransformOperation parse = new TransformOperation("parse", "parse body", Collections.singletonList(InputField.of("read", "body")), "name", "address"); WriteOperation write = new WriteOperation("write", "write data", EndPoint.of("ns", "endpoint2"), Arrays.asList(InputField.of("read", "offset"), InputField.of("parse", "name"), InputField.of("parse", "body"))); List<Operation> operations = new ArrayList<>(); operations.add(read); operations.add(write); operations.add(parse); FieldLineageInfo info1 = new FieldLineageInfo(operations); String operationsJson = GSON.toJson(info1.getOperations()); Type setType = new TypeToken<Set<Operation>>() { }.getType(); Set<Operation> operationsFromJson = GSON.fromJson(operationsJson, setType); FieldLineageInfo info2 = new FieldLineageInfo(operationsFromJson); Assert.assertEquals(info1, info2); operations.clear(); operations.add(write); operations.add(parse); operations.add(read); FieldLineageInfo info3 = new FieldLineageInfo(operations); Assert.assertEquals(info1, info3); operations.clear(); WriteOperation anotherWrite = new WriteOperation("write", "write data", EndPoint.of("myns", "endpoint2"), Arrays.asList(InputField.of("read", "offset"), InputField.of("parse", "name"), InputField.of("parse", "body"))); operations.add(anotherWrite); operations.add(parse); operations.add(read); FieldLineageInfo info4 = new FieldLineageInfo(operations); Assert.assertNotEquals(info1, info4); }