title: Robolectric shadow not working
body: <p>I'm trying to create a test with <strong>Robolectric</strong>. My goal is to be able to replace the functionality of one class (that comes for example from a library and I can't modify the code) from a custom behaviour.</p>
  
  <p>I created this small test to simulate what I want to do:</p>
  
  <pre class="lang-java prettyprint-override"><code>@RunWith(RobolectricTestRunner.class)
  @Config(shadows = {ShadowMessenger.class})
  public class TestShadow {
  
      @Test
      public void testMessenger() {
          OriginalMessenger messenger = new OriginalMessenger();
          String message = messenger.getMessage();
          Assert.assertEquals("Shadow messenger", message);
      }
  
      public static class OriginalMessenger {
  
          public String getMessage() {
              return "Original messenger";
          }
      }
  
      @Implements(OriginalMessenger.class)
      public static class ShadowMessenger extends OriginalMessenger {
  
          @Implementation
          public String getMessage() {
              return "Shadow messenger";
          }
      }
  }
  </code></pre>
  
  <p>In the example, <em>OriginalMessenger</em> is the class that is in the library and provides a default functionality. And <em>ShadowMessenger</em> is the class that contains the custom behaviour that I want to apply whenever I use <em>OriginalMessenger</em>.</p>
  
  <p>However when I run the test it fails. The content of <em>message</em> is "Original messenger". As if the <em>ShadowMessenger</em> was never used.</p>
  
  <p>What am I doing wrong?</p>