There is such a test method
import com.fittingroom.newtimezone.model.ModelAcceptNotAccept; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.runners.MockitoJUnitRunner; import static android.support.test.espresso.matcher.ViewMatchers.assertThat; import static org.hamcrest.CoreMatchers.is; import static org.mockito.Mockito.when; @RunWith(MockitoJUnitRunner.class) public class PresenterActivityAcceptNotAcceptTest { @Mock ModelAcceptNotAccept model; @Before public void setUp() throws Exception { } @Test public void setOriginPreviewImage() throws Exception { when(model.getImageFilePath()).thenReturn("path"); String path = model.getImageFilePath(); assertThat(path, is("path")); } and when I run setOriginPreviewImage() I get this
What did you do wrong?
