@@ -0,0 +1,2415 @@
+package com.blundell.quicksand;%0A%0Aimport android.os.CountDownTimer;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0A%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Matchers.anyLong;%0Aimport static org.mockito.Mockito.*;%0A%0Apublic class AnimationTrackerTest %7B%0A%0A    private static final long ANY_DURATION = 1L;%0A%0A    @Mock%0A    private AnimationCounter mockCounter;%0A    @Mock%0A    private CountDownTimerFactory mockTimerFactory;%0A    @Mock%0A    private CountDownTimer mockTimer;%0A    private AnimationTracker tracker;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        MockitoAnnotations.initMocks(this);%0A        tracker = new AnimationTracker(mockCounter, mockTimerFactory);%0A        when(mockTimerFactory.getTimer(anyLong(), any(Runnable.class))).thenReturn(mockTimer);%0A    %7D%0A%0A    @Test%0A    public void givenAnAnimationIsNotPartOfASetWhenIncrementViewCountIsAttemptedThenThereIsAnIncrement() throws Exception %7B%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey%22, ANY_DURATION);%0A%0A        verify(mockCounter).incrementCount(%22TestKey%22);%0A    %7D%0A%0A    @Test%0A    public void givenAnAnimationIsPartOfASetWhenIncrementIsAttemptedThenThereIsOnlyOneIncrement() throws Exception %7B%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey%22, ANY_DURATION);%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey%22, ANY_DURATION);%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey%22, ANY_DURATION);%0A%0A        verify(mockCounter, times(1)).incrementCount(%22TestKey%22);%0A    %7D%0A%0A    @Test%0A    public void givenTwoAnimationsAreNotPartOfASetWhenIncrementViewCountIsAttemptedThenThereIsTwoIncrements() throws Exception %7B%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey1%22, ANY_DURATION);%0A        tracker.attemptToIncrementAnimationSetViewCount(%22TestKey2%22, ANY_DURATION);%0A%0A        verify(mockCounter, times(2)).incrementCount(anyString());%0A    %7D%0A%0A    @Test%0A    public void whenGetCountThenDelegatesToCounter() throws Exception %7B%0A        String expectedKey = %22TestKey%22;%0A        tracker.getCount(expectedKey);%0A%0A        verify(mockCounter).getCount(expectedKey);%0A    %7D%0A%0A    @Test%0A    public void whenResetCountThenDelegatesToCounter() throws Exception %7B%0A        String expectedKey = %22TestKey%22;%0A        tracker.resetCount(expectedKey);%0A%0A        verify(mockCounter).resetCount(expectedKey);%0A    %7D%0A%7D%0A

add tests to understand the incrementing of animation views