@@ -0,0 +1,1849 @@
+package com.episode6.hackit.mockspresso.internal;%0A%0Aimport com.episode6.hackit.mockspresso.DefaultTestRunner;%0Aimport com.episode6.hackit.mockspresso.Mockspresso;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.InOrder;%0Aimport org.mockito.Mock;%0Aimport org.mockito.Mockito;%0Aimport org.mockito.MockitoAnnotations;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verifyNoMoreInteractions;%0A%0A/**%0A * Tests %7B@link ResourcesLifecycleManager%7D%0A */%0A@RunWith(DefaultTestRunner.class)%0Apublic class ResourcesLifecycleManagerTest %7B%0A%0A  @Mock Mockspresso mMockspresso;%0A%0A  List%3CResourcesLifecycleComponent%3E mLifecycleComponents;%0A  ResourcesLifecycleManager mResourcesLifecycleManager;%0A%0A  @Before%0A  public void setup() %7B%0A    MockitoAnnotations.initMocks(this);%0A%0A    mLifecycleComponents = new ArrayList%3C%3E();%0A    for (int i = 0; i %3C 5; i++) %7B%0A      mLifecycleComponents.add(mock(ResourcesLifecycleComponent.class));%0A    %7D%0A    mResourcesLifecycleManager = new ResourcesLifecycleManager(mLifecycleComponents);%0A  %7D%0A%0A  @Test%0A  public void testSetupOrder() %7B%0A    mResourcesLifecycleManager.setup(mMockspresso);%0A%0A    InOrder inOrder = Mockito.inOrder(mLifecycleComponents.toArray());%0A    for (int i = 0; i %3C mLifecycleComponents.size(); i++) %7B%0A      inOrder.verify(mLifecycleComponents.get(i)).setup(mMockspresso);%0A    %7D%0A    verifyNoMoreInteractions(mLifecycleComponents.toArray());%0A  %7D%0A%0A  @Test%0A  public void testTeardownOrder() %7B%0A    mResourcesLifecycleManager.teardown();%0A%0A    InOrder inOrder = Mockito.inOrder(mLifecycleComponents.toArray());%0A    for (int i = mLifecycleComponents.size() - 1; i%3E=0; i--) %7B%0A      inOrder.verify(mLifecycleComponents.get(i)).teardown();%0A    %7D%0A    verifyNoMoreInteractions(mLifecycleComponents.toArray());%0A  %7D%0A%7D%0A

test for ResourcesLifecycleManager