PopupCreator { SingleFieldConstraintEBLeftSide makeSingleFieldConstraintEBLeftSide(final String factType) { final SingleFieldConstraintEBLeftSide constraint = new SingleFieldConstraintEBLeftSide(); final ExpressionFormLine expression = makeExpressionFormLine(factType); constraint.setConstraintValueType(SingleFieldConstraint.TYPE_UNDEFINED); constraint.setExpressionLeftSide(expression); constraint.setFactType(factType); return constraint; }  FactPattern getPattern(); void setPattern(FactPattern pattern); AsyncPackageDataModelOracle getDataModelOracle(); void setDataModelOracle(AsyncPackageDataModelOracle oracle); RuleModeller getModeller(); void setModeller(RuleModeller modeller); boolean isBindable(); void setBindable(boolean bindable); void showBindFieldPopup(final FactPattern fp,
                                   final SingleFieldConstraint con,
                                   final ModelField[] fields,
                                   final PopupCreator popupCreator); void showPatternPopupForComposite(final HasConstraints hasConstraints); void showPatternPopup(final FactPattern fp,
                                 final SingleFieldConstraint con,
                                 final boolean isNested);  }
@Test public void testMakeSingleFieldConstraintEBLeftSide() { final String expectedFactType = "factType"; final ExpressionFormLine expectedExpressionFormLine = mock(ExpressionFormLine.class); final int expectedConstraintValueType = SingleFieldConstraint.TYPE_UNDEFINED; doReturn(expectedExpressionFormLine).when(popupCreator).makeExpressionFormLine(expectedFactType); final SingleFieldConstraintEBLeftSide constraint = popupCreator.makeSingleFieldConstraintEBLeftSide(expectedFactType); assertEquals(expectedConstraintValueType, constraint.getConstraintValueType()); assertEquals(expectedExpressionFormLine, constraint.getExpressionLeftSide()); assertEquals(expectedFactType, constraint.getFactType()); }