// Path: app/src/test/java/io/petros/posts/PreconfiguredRobolectricTestRunner.java
// public class PreconfiguredRobolectricTestRunner extends RobolectricTestRunner {
// 
//     private static final int SDK_API_LEVEL_TO_EMULATE = 25;
// 
//     /**
//      * Creates a runner to run {@code testClass}. Looks in your working directory for your AndroidManifest.xml file and res directory by
//      * default. Use the {@link Config} annotation to configure.
//      *
//      * @param testClass The test class to be run.
//      * @throws InitializationError If junit says so.
//      */
//     public PreconfiguredRobolectricTestRunner(final Class<?> testClass) throws InitializationError {
//         super(testClass);
//     }
// 
//     @Override
//     protected Config buildGlobalConfig() {
//         return new Config.Builder()
//                 .setSdk(SDK_API_LEVEL_TO_EMULATE)
//                 .setManifest(Config.NONE)
//                 .setApplication(TestPostsApplication.class)
//                 .build();
//     }
// 
// }
// 
// Path: app/src/test/java/io/petros/posts/RobolectricGeneralTestHelper.java
// public class RobolectricGeneralTestHelper extends GeneralTestHelper {
// 
//     // Application specific fields.
//     protected final Context context = getTestContext();
//     protected final PostsApplication application = getTestApplication();
// 
//     // System specific fields.
//     @Mock protected ConnectivityManager connectivityManagerMock;
// 
//     // Activity specific fields.
//     @Mock protected PostsApplication applicationMock;
//     @Mock protected SnackbarActions snackbarActionsMock;
// 
//     // ROBOLECTRIC // *******************************************************************************************************
// 
//     private Context getTestContext() {
//         return getShadowApplication().getApplicationContext();
//     }
// 
//     private ShadowApplication getShadowApplication() {
//         return ShadowApplication.getInstance();
//     }
// 
//     private PostsApplication getTestApplication() {
//         return (PostsApplication) RuntimeEnvironment.application;
//     }
// 
//     // MOCKS // *************************************************************************************************************
// 
//     protected void setUpMocks() {
//         super.setUpMocks();
//         setUpApplicationMocks();
//     }
// 
//     private void setUpApplicationMocks() {
//         when(applicationMock.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(connectivityManagerMock);
//         when(applicationMock.snackbar()).thenReturn(snackbarActionsMock);
//     }
// 
//     // POST // **************************************************************************************************************
// 
//     protected Bundle getExtras(final Post post) {
//         final Bundle extras = new Bundle();
//         extras.putInt(Post.USER_ID, post.getUserId());
//         extras.putInt(Post.ID, post.getId());
//         extras.putString(Post.TITLE, post.getTitle());
//         extras.putString(Post.BODY, post.getBody());
//         return extras;
//     }
// 
// }
// 
// Path: app/src/main/java/io/petros/posts/model/Post.java
// public class Post {
// 
//     public static final String USER_ID = "userId";
//     public static final String ID = "id";
//     public static final String TITLE = "title";
//     public static final String BODY = "body";
// 
//     @SerializedName(USER_ID)
//     @Expose
//     private Integer userId;
// 
//     @SerializedName(ID)
//     @Expose
//     private Integer id;
// 
//     @SerializedName(TITLE)
//     @Expose
//     private String title;
// 
//     @SerializedName(BODY)
//     @Expose
//     private String body;
// 
//     public Integer getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(final Integer userId) {
//         this.userId = userId;
//     }
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(final Integer id) {
//         this.id = id;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(final String title) {
//         this.title = title;
//     }
// 
//     public String getBody() {
//         return body;
//     }
// 
//     public void setBody(final String body) {
//         this.body = body;
//     }
// 
// }


import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import java.util.List;
import io.petros.posts.PreconfiguredRobolectricTestRunner;
import io.petros.posts.RobolectricGeneralTestHelper;
import io.petros.posts.model.Post;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
package io.petros.posts.activity.posts.view.recycler;





@RunWith(PreconfiguredRobolectricTestRunner.class)
public class PostRecyclerViewAdapterTest extends RobolectricGeneralTestHelper {

    private static final int POSITION = 0;

    private PostRecyclerViewAdapter postRecyclerViewAdapter;
    @Mock private OnViewClickListener onViewClickListenerMock;
    @Mock private PostViewHolder holderMock;
// Path: app/src/test/java/io/petros/posts/PreconfiguredRobolectricTestRunner.java
// public class PreconfiguredRobolectricTestRunner extends RobolectricTestRunner {
// 
//     private static final int SDK_API_LEVEL_TO_EMULATE = 25;
// 
//     /**
//      * Creates a runner to run {@code testClass}. Looks in your working directory for your AndroidManifest.xml file and res directory by
//      * default. Use the {@link Config} annotation to configure.
//      *
//      * @param testClass The test class to be run.
//      * @throws InitializationError If junit says so.
//      */
//     public PreconfiguredRobolectricTestRunner(final Class<?> testClass) throws InitializationError {
//         super(testClass);
//     }
// 
//     @Override
//     protected Config buildGlobalConfig() {
//         return new Config.Builder()
//                 .setSdk(SDK_API_LEVEL_TO_EMULATE)
//                 .setManifest(Config.NONE)
//                 .setApplication(TestPostsApplication.class)
//                 .build();
//     }
// 
// }
// 
// Path: app/src/test/java/io/petros/posts/RobolectricGeneralTestHelper.java
// public class RobolectricGeneralTestHelper extends GeneralTestHelper {
// 
//     // Application specific fields.
//     protected final Context context = getTestContext();
//     protected final PostsApplication application = getTestApplication();
// 
//     // System specific fields.
//     @Mock protected ConnectivityManager connectivityManagerMock;
// 
//     // Activity specific fields.
//     @Mock protected PostsApplication applicationMock;
//     @Mock protected SnackbarActions snackbarActionsMock;
// 
//     // ROBOLECTRIC // *******************************************************************************************************
// 
//     private Context getTestContext() {
//         return getShadowApplication().getApplicationContext();
//     }
// 
//     private ShadowApplication getShadowApplication() {
//         return ShadowApplication.getInstance();
//     }
// 
//     private PostsApplication getTestApplication() {
//         return (PostsApplication) RuntimeEnvironment.application;
//     }
// 
//     // MOCKS // *************************************************************************************************************
// 
//     protected void setUpMocks() {
//         super.setUpMocks();
//         setUpApplicationMocks();
//     }
// 
//     private void setUpApplicationMocks() {
//         when(applicationMock.getSystemService(Context.CONNECTIVITY_SERVICE)).thenReturn(connectivityManagerMock);
//         when(applicationMock.snackbar()).thenReturn(snackbarActionsMock);
//     }
// 
//     // POST // **************************************************************************************************************
// 
//     protected Bundle getExtras(final Post post) {
//         final Bundle extras = new Bundle();
//         extras.putInt(Post.USER_ID, post.getUserId());
//         extras.putInt(Post.ID, post.getId());
//         extras.putString(Post.TITLE, post.getTitle());
//         extras.putString(Post.BODY, post.getBody());
//         return extras;
//     }
// 
// }
// 
// Path: app/src/main/java/io/petros/posts/model/Post.java
// public class Post {
// 
//     public static final String USER_ID = "userId";
//     public static final String ID = "id";
//     public static final String TITLE = "title";
//     public static final String BODY = "body";
// 
//     @SerializedName(USER_ID)
//     @Expose
//     private Integer userId;
// 
//     @SerializedName(ID)
//     @Expose
//     private Integer id;
// 
//     @SerializedName(TITLE)
//     @Expose
//     private String title;
// 
//     @SerializedName(BODY)
//     @Expose
//     private String body;
// 
//     public Integer getUserId() {
//         return userId;
//     }
// 
//     public void setUserId(final Integer userId) {
//         this.userId = userId;
//     }
// 
//     public Integer getId() {
//         return id;
//     }
// 
//     public void setId(final Integer id) {
//         this.id = id;
//     }
// 
//     public String getTitle() {
//         return title;
//     }
// 
//     public void setTitle(final String title) {
//         this.title = title;
//     }
// 
//     public String getBody() {
//         return body;
//     }
// 
//     public void setBody(final String body) {
//         this.body = body;
//     }
// 
// }


// Path: app/src/test/java/io/petros/posts/activity/posts/view/recycler/PostRecyclerViewAdapterTest.java
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import java.util.List;
import io.petros.posts.PreconfiguredRobolectricTestRunner;
import io.petros.posts.RobolectricGeneralTestHelper;
import io.petros.posts.model.Post;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;

package io.petros.posts.activity.posts.view.recycler;





@RunWith(PreconfiguredRobolectricTestRunner.class)
public class PostRecyclerViewAdapterTest extends RobolectricGeneralTestHelper {

    private static final int POSITION = 0;

    private PostRecyclerViewAdapter postRecyclerViewAdapter;
    @Mock private OnViewClickListener onViewClickListenerMock;
    @Mock private PostViewHolder holderMock;
    @Mock private List<Post> postsMock;