### Question:
OperationPM extends AbstractOperationPM { public boolean execute() throws Throwable { for (ExecutionMethod exe : executionMethods) { boolean continueExecution = exe.execute(); if ( !continueExecution) { return false; } } return true; } OperationPM(); boolean execute(); synchronized Collection<ExecutionMethod> getExecutionMethods(); synchronized void setExecutionMethods(Collection<ExecutionMethod> newExecutionMethods); synchronized void addExecutionMethod(ExecutionMethod exe); synchronized void removeExecutionMethod(ExecutionMethod exe); boolean containsExecutionMethod(ExecutionMethod exe); boolean hasExecutionMethods();  }### Answer:
@Test public void executeFoo() throws Throwable { SamplePM pModel = new SamplePM(); pModel.foo.execute(); assertEquals("pModel.fooCount.getInteger()", 1, (int)pModel.fooCount.getInteger()); }
@Test public void executeBar() throws Throwable { SamplePM pModel = new SamplePM(); pModel.bar.execute(); assertEquals("pModel.barCount.getInteger()", 1, (int)pModel.barCount.getInteger()); }
@Test public void continueOperationExecutionWhenReturnValueIsTrue() throws Throwable { ParentPM pm = new ParentPM(); pm.child.myOpA.execute(); assertEquals( "pm.executedParentOpA", true, pm.executedParentOpA); }
@Test public void stopOperationExecutionWhenReturnValueIsFalse() throws Throwable { ParentPM pm = new ParentPM(); pm.child.myOpB.execute(); assertEquals( "pm.executedParentOpB", false, pm.executedParentOpB); }