@Test(expected = IllegalStateException.class)
public void testCallUpdateAfterEnd() {

  UpdateParent.UpdateField updateField =
      new UpdateParent.BaseUpdateField() {
        @Override
        protected void doEnd(Metacard parent, Context context) {}
        @Override
        protected void doUpdateField(Metacard parent, List<Metacard> children, Context context) {}
      };
  Context context = mock(Context.class);
  Metacard parent = mock(Metacard.class);
  Metacard child = mock(Metacard.class);
  updateField.end(parent, context);
  updateField.updateField(parent, Collections.singletonList(child), context);
}