@Test public void perform() { List<String> operations = new LinkedList<>(); OperationSequence testSubject = new OperationSequence(asList(() -> operations.add("A"), () -> operations.add("B"), () -> operations.add("C"))); testSubject.perform(); assertEquals(asList("A","B","C"), operations); }
@Override public void perform() { sequence.forEach(LoadBalancingOperation::perform); }
OperationSequence implements LoadBalancingOperation { @Override public void perform() { sequence.forEach(LoadBalancingOperation::perform); } }
OperationSequence implements LoadBalancingOperation { @Override public void perform() { sequence.forEach(LoadBalancingOperation::perform); } OperationSequence(List<LoadBalancingOperation> sequence); }
OperationSequence implements LoadBalancingOperation { @Override public void perform() { sequence.forEach(LoadBalancingOperation::perform); } OperationSequence(List<LoadBalancingOperation> sequence); @Override void perform(); }
OperationSequence implements LoadBalancingOperation { @Override public void perform() { sequence.forEach(LoadBalancingOperation::perform); } OperationSequence(List<LoadBalancingOperation> sequence); @Override void perform();  }