### Question:
StepFieldOperations extends StepField { public String toString() { StringBuffer sb = new StringBuffer( "{ step:" ); sb.append( getStepName() ); sb.append( ", field:" ); sb.append( getFieldName() ); sb.append( ", operations: " ); sb.append( operations == null ? "{ none }" : operations ); sb.append( " }" ); return sb.toString(); } StepFieldOperations();  StepFieldOperations( StepField stepField, Operations operations );  StepFieldOperations( String stepName, String fieldName, Operations operations ); Operations getOperations(); void setOperations( Operations operations ); String toString();  }### Answer:
@Test public void testToString() { stepFieldOperations = new StepFieldOperations( "testStep", "testField", null ); assertEquals( "{ step:testStep, field:testField, operations: { none } }", stepFieldOperations.toString() ); Operations operations = new Operations(); operations.addOperation( ChangeType.METADATA, Operation.getRenameOperation() ); operations.addOperation( ChangeType.DATA, new Operation( Operation.CALC_CATEGORY, ChangeType.DATA, "dataOp", "calcStuff" ) ); stepFieldOperations.setOperations( operations ); assertEquals( "{ step:testStep, field:testField, operations: " + "{metadataOperations=[modified: name], dataOperations=[dataOp: calcStuff]} }", stepFieldOperations.toString() ); }