### Question:
DataTypeConstraintModal extends Elemental2Modal<DataTypeConstraintModal.View> { void onDataTypeConstraintParserWarningEvent(final @Observes DataTypeConstraintParserWarningEvent e) { getView().showConstraintWarningMessage(); } @Inject  DataTypeConstraintModal(final View view,
                                   final DataTypeShortcuts dataTypeShortcuts,
                                   final DataTypeConstraintEnumeration constraintEnumeration,
                                   final DataTypeConstraintExpression constraintExpression,
                                   final DataTypeConstraintRange constraintRange); @PostConstruct void setup(); void save(); void show(final BiConsumer<String, ConstraintType> onSaveConsumer); @Override void hide(); void enableOkButton(); void disableOkButton();  }### Answer:
@Test public void testOnDataTypeConstraintParserWarningEvent() { modal.onDataTypeConstraintParserWarningEvent(mock(DataTypeConstraintParserWarningEvent.class)); verify(view).showConstraintWarningMessage(); }