@Before
  public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);

    receiver = spy(Robolectric.buildService(GooglePlayReceiver.class).create().get());
    when(contraintCheckerMock.areConstraintsSatisfied(any(JobInvocation.class))).thenReturn(true);
    when(receiver.getExecutionDelegator()).thenReturn(executionDelegatorMock);
    receiver.setGooglePlayDriver(driverMock);
    receiver.setValidationEnforcer(new ValidationEnforcer(new NoopJobValidator()));
    when(contextMock.getPackageName()).thenReturn("foo.bar.whatever");
  }
The default ShadowMessenger implementation causes NPEs when using the {@link
Messenger#Messenger(Handler)} constructor. We create our own empty Shadow so we can just use
the standard Android implementation, which is totally fine.

@see <a href="https://github.com/robolectric/robolectric/issues/2246">Robolectric issue</a>
jobdispatcher/src/test/java/com/firebase/jobdispatcher/GooglePlayReceiverTest.java