LocationUpdateFieldFactory implements UpdateParentFactory.Factory { @Override public UpdateParent.UpdateField build() { return new LocationUpdateField(preUnionGeometryOperator, postUnionGeometryOperator); } LocationUpdateFieldFactory(
      GeometryOperator preUnionGeometryOperator, GeometryOperator postUnionGeometryOperator); @Override UpdateParent.UpdateField build(); GeometryOperator getPreUnionGeometryOperator(); GeometryOperator getPostUnionGeometryOperator();  }
@Test public void testBuild() { GeometryOperator preUnionGeometryOperator = mock(GeometryOperator.class); GeometryOperator postUnionGeometryOperator = mock(GeometryOperator.class); LocationUpdateFieldFactory factory = new LocationUpdateFieldFactory(preUnionGeometryOperator, postUnionGeometryOperator); UpdateParent.UpdateField updateField = factory.build(); assertThat(updateField, is(instanceOf(LocationUpdateField.class))); LocationUpdateField locationUpdateField = (LocationUpdateField) updateField; assertThat(locationUpdateField.getPreUnionGeometryOperator(), is(preUnionGeometryOperator)); assertThat(locationUpdateField.getPostUnionGeometryOperator(), is(postUnionGeometryOperator)); }