package com.creatubbles.api.repository;

import com.creatubbles.api.CreatubblesApi;
import com.creatubbles.api.TestUtils;
import com.creatubbles.api.exception.InitializationException;
import com.creatubbles.api.exception.InvalidParametersException;
import com.creatubbles.api.model.AuthToken;

import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.robolectric.RobolectricTestRunner;

import static org.junit.Assert.assertNotNull;

/**
 * Created by Janek on 07.03.2016.
 */
@RunWith(RobolectricTestRunner.class)
public class GalleryRepositoryBuilderTest {

    @Mock
    AuthToken authToken;

    private GalleryRepositoryBuilder target;

    @Before
    public void setUp() {
        MockitoAnnotations.initMocks(this);
        CreatubblesApi.reset();
        TestUtils.resetModule();
        target = new GalleryRepositoryBuilder();
    }

    @Test(expected = InitializationException.class)
    public void testThrowsWhenCreatubblesApiIsNotInitialized() {
        target.setAuthToken(authToken).build();
    }

    @Test(expected = InvalidParametersException.class)
    public void testThrowsWhenMissedAuthToken() {
        target.build();
    }

    @Test
    public void testIsNotNullWhenPassedCorrectParameters() {
        TestUtils.initializeCreatubblesApi();
        target.setAuthToken(new AuthToken("testToken", "testTokenType", 3L));
        GalleryRepository repository = target.build();
        assertNotNull(repository);
    }
}

@@ -339,41 +339,8 @@
 st;%0A
-import org.junit.runner.RunWith;%0A
 impo
@@ -402,54 +402,8 @@
 ons;
-%0Aimport org.robolectric.RobolectricTestRunner;
 %0A%0Aim
@@ -494,46 +494,8 @@
  */%0A
-@RunWith(RobolectricTestRunner.class)%0A
 publ

Remove unwanted code