title: JUnit test always returning null
body: <p>I am writing a JUnit test case for my code, but the Mockito is always returning <code>null</code></p>
  
  <pre><code>@Component
  public class ConnectorImpl {
  
      public String returnString(String inte) {
  
          String x = testing();
          return x;
      }
  
      public String testing() {
          return "test";
      }
  }
  </code></pre>
  
  <p>Test class</p>
  
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class ConnectorImplTest  {
  
      @Mock public ConnectorImpl connector;
  
      @Test
      public void testLoggedInRefill() throws Exception {
  
          Mockito.when(connector.testing()).thenReturn("test");
  
  
          String x = connector.returnString("8807");
  
          assertEquals("8807", x);
      }
  
  }
  </code></pre>
  
  <p>When I am calling <code>connector.returnString("8807");</code>, it is always returning <code>null</code>. Is there anything I am doing wrong? I am new to JUnit.</p>