@Test public void onStart_shouldCallThroughToAllProvidedCallbacks() throws Exception { multiCallbacks.onStart(); assertThat(testCallbacks0.startWasCalled, equalTo(true)); assertThat(testCallbacks1.startWasCalled, equalTo(true)); }
@Override public void onStart() { for (Callbacks callback : callbacks) { callback.onStart(); } }
MultiCallbacks extends Callbacks { @Override public void onStart() { for (Callbacks callback : callbacks) { callback.onStart(); } } }
MultiCallbacks extends Callbacks { @Override public void onStart() { for (Callbacks callback : callbacks) { callback.onStart(); } } MultiCallbacks(Callbacks... callbacks); }
MultiCallbacks extends Callbacks { @Override public void onStart() { for (Callbacks callback : callbacks) { callback.onStart(); } } MultiCallbacks(Callbacks... callbacks); @Override void onStart(); @Override void onSuccess(); @Override void onFailure(); @Override void onComplete(); }
MultiCallbacks extends Callbacks { @Override public void onStart() { for (Callbacks callback : callbacks) { callback.onStart(); } } MultiCallbacks(Callbacks... callbacks); @Override void onStart(); @Override void onSuccess(); @Override void onFailure(); @Override void onComplete();  }