ResourcesLifecycleManager implements ResourcesLifecycleComponent { @Override public void setup(Mockspresso mockspresso) { for (ResourcesLifecycleComponent component : mLifecycleComponents) { component.setup(mockspresso); } } ResourcesLifecycleManager(List<ResourcesLifecycleComponent> lifecycleComponents); @Override void setup(Mockspresso mockspresso); @Override void teardown();  }
@Test public void testSetupOrder() { mResourcesLifecycleManager.setup(mMockspresso); InOrder inOrder = Mockito.inOrder(mLifecycleComponents.toArray()); for (int i = 0; i < mLifecycleComponents.size(); i++) { inOrder.verify(mLifecycleComponents.get(i)).setup(mMockspresso); } verifyNoMoreInteractions(mLifecycleComponents.toArray()); }