@@ -0,0 +1,1862 @@
+package com.verybadalloc.books.network;%0A%0Aimport com.verybadalloc.books.model.Book;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Created by anasambri on 2016-09-12.%0A */%0A%0Apublic class FakeDataFetcherTest %7B%0A%0A    private static final Book%5B%5D data;%0A    private static final String reason = %22Could not fetch books%22;%0A%0A    static %7B%0A        Book b1 = new Book();%0A        b1.id = 1;%0A        b1.author = %22Paula Hawkins%22;%0A        b1.imgUrl = %22http://ecx.images-amazon.com/images/I/51-VcOHdoFL._SL160_PIsitb-sticker-arrow-dp,TopRight,12,-18_SH30_OU15_SL150_.jpg%22;%0A        b1.name = %22The Girl on the Train%22;%0A        data = new Book%5B%5D %7Bb1%7D;%0A    %7D%0A%0A    @Test%0A    public void dataFetcher_SuccessReturnsData() %7B%0A        dataFetcherSuccess().getBooks(new DataCallback%3CBook%5B%5D%3E() %7B%0A            @Override%0A            public void onSuccess(Book%5B%5D data) %7B%0A                assertArrayEquals(data, FakeDataFetcherTest.data);%0A            %7D%0A%0A            @Override%0A            public void onFailure(String reason) %7B%0A                assertTrue(%22Callback returned unexpected data%22, false);%0A            %7D%0A        %7D);%0A    %7D%0A%0A    @Test%0A    public void dataFetcher_FailureReturnsErrorMessage() %7B%0A        dataFetcherFailure().getBooks(new DataCallback%3CBook%5B%5D%3E() %7B%0A            @Override%0A            public void onSuccess(Book%5B%5D data) %7B%0A                assertTrue(%22Callback returned unexpected data%22, false);%0A            %7D%0A%0A            @Override%0A            public void onFailure(String reason) %7B%0A                assertEquals(reason, FakeDataFetcherTest.reason);%0A            %7D%0A        %7D);%0A    %7D%0A%0A    private FakeDataFetcher dataFetcherSuccess() %7B%0A        return new FakeDataFetcher(data);%0A    %7D%0A%0A    private FakeDataFetcher dataFetcherFailure() %7B%0A        return new FakeDataFetcher(reason);%0A    %7D%0A%0A%7D

Add tests for FakeDataFetcher