### Question:
DataTypeConstraint { BiConsumer<String, ConstraintType> getOnShowConsumer() { return (newConstraintValue, newConstraintType) -> { setConstraint(newConstraintValue, newConstraintType); refreshView(); }; } @Inject  DataTypeConstraint(final View view,
                              final ManagedInstance<DataTypeConstraintModal> constraintModalManagedInstance); void init(final DataTypeListItem listItem); String getValue(); ConstraintType getConstraintType(); HTMLElement getElement(); void enableEditMode(); void disableEditMode(); void refreshView(); void disable(); void enable();  }### Answer:
@Test public void testGetOnShowConsumer() { final String expectedConstraint = "1,2,3"; final ConstraintType expectedConstraintType = ENUMERATION; dataTypeConstraint.getOnShowConsumer().accept(expectedConstraint, ENUMERATION); final String actualConstraint = dataTypeConstraint.getValue(); final ConstraintType actualConstraintType = dataTypeConstraint.getConstraintType(); assertEquals(expectedConstraint, actualConstraint); assertEquals(expectedConstraintType, actualConstraintType); verify(dataTypeConstraint).refreshView(); }