title: assertEquals - always pass test - Android Studio
body: <p>I'm new on junit test. I do not understand where I'm wrong. here is a simple unit tests (which simplifies my real test): </p>
  
  <pre><code>import android.test.InstrumentationTestCase;
  public class exampleTest extends InstrumentationTestCase {
      String ob1, ob2;
  
      public void setUp() throws Exception {
          super.setUp();
          ob1 = "hi";
          ob2 = "bye";
      }
  
     public void  testEx()throws Exception{
         assertEquals("Error", ob1, ob2);
     }
  }
  </code></pre>
  
  <p>When I run exampleTest I get that the test always passes. </p>
  
  <p>Where i'm wrong? can someone explain me?</p>
  
  <p>My build.gradle file is:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 'Google Inc.:Google APIs:21'
      buildToolsVersion "23.0.3"
  
      defaultConfig {
          applicationId "com.myapp.mobile.app.servizi.activity"
          minSdkVersion 9
          targetSdkVersion 21
  
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      sourceSets {
          main {
              java.srcDirs = ['src/main/java', 'src/test/java']
          }
  
      }
  
  
      //instruct the Gradle build system to return default values for method calls
      //in the `android.jar`with the following configuration in your Gradle build file.
      testOptions {
          unitTests{
              returnDefaultValues = true
          }
      }
  
  
  }
  
  
  dependencies {
      compile project(':androidswitchbackport')
      compile project(':librarySlidingMenu')
      compile project(':libraryViewPagerIndicator')
      compile 'com.google.code.gson:gson:2.3.1'
      compile 'com.google.android.gms:play-services:7.0.0'
      compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
      compile 'com.android.support:support-v4:21.0.0'
  
      //dependency for Local test
      // Required -- JUnit 4 framework
      testCompile 'junit:junit:4.12'
      // Optional -- Mockito framework
      testCompile 'org.mockito:mockito-core:1.10.19'
  
  }
  </code></pre>
  
  <p>The gradle file has many dependency because the App in question is complex, long and old, and I have the responsibility to make the tests. I would be grateful if you gave me a hand.</p>