### Question:
SimpleConditionEditorPresenter extends FieldEditorPresenter<Condition> { public boolean isValid() { return valid; } @Inject  SimpleConditionEditorPresenter(final View view,
                                          final ManagedInstance<ConditionParamPresenter> paramInstance,
                                          final VariableSearchService variableSearchService,
                                          final FunctionSearchService functionSearchService,
                                          final FunctionNamingService functionNamingService,
                                          final ClientTranslationService translationService); @PostConstruct void init(); View getView(); void init(ClientSession session); @Override void setValue(Condition value); @Override void setReadOnly(boolean readOnly); void clear(); boolean isValid();  }### Answer:
@Test public void testOnParamChangeWhenParamsAreValid() { prepareForParamChangeTest(true); paramCommandCaptor.getValue().execute(); verifyConditionWasCreated(); assertTrue(presenter.isValid()); }
@Test public void testOnParamChangeWhenParamsAreNotValid() { prepareForParamChangeTest(false); paramCommandCaptor.getValue().execute(); verifyConditionWasCreated(); assertFalse(presenter.isValid()); }