PlannerUtils { public static Row setMutationType(Row row, MutationType mutationType) { if (!hasMutationTypeField(row)) { row = appendMutationTypeField(row); } return RowUtils.set(row, MutationType.MUTATION_TYPE_FIELD_NAME, mutationType.toString()); }  static Row setMutationType(Row row, MutationType mutationType); static MutationType getMutationType(Row row); static Row appendMutationTypeField(Row row); static Row removeMutationTypeField(Row row); static boolean hasMutationTypeField(Row row); static Row copyTime(Row fromRow, TimeModel fromTimeModel, Row into, TimeModel intoTimeModel); static Row copyPrecedingTime(Row fromRow, TimeModel fromTimeModel, Row into, TimeModel intoTimeModel); static boolean before(TimeModel timeModel, Row first, Row second); static boolean simultaneous(TimeModel timeModel, Row first, Row second); static boolean after(TimeModel timeModel, Row first, Row second); static Row appendSurrogateKey(Row row, String fieldName);  }
@Test public void testSetMutationType() { Row rowWith = new RowWithSchema(schemaWithMT, "hello", null); rowWith = PlannerUtils.setMutationType(rowWith, MutationType.DELETE); assertEquals(rowWith.<String>getAs(MutationType.MUTATION_TYPE_FIELD_NAME), MutationType.DELETE.toString()); Row rowWithout = new RowWithSchema(schemaWithoutMT, "hello"); rowWithout = PlannerUtils.setMutationType(rowWithout, MutationType.DELETE); assertEquals(rowWithout.<String>getAs(MutationType.MUTATION_TYPE_FIELD_NAME), MutationType.DELETE.toString()); }