@Test
public void testGetPendingIntentForLocation() {

    // when pendingIntent type is location
    PendingIntent actual = PendingIntentFactory.getPendingIntent(application,
            PendingIntentFactory.PENDING_INTENT_LOCATION, PendingIntent.FLAG_UPDATE_CURRENT);
    ShadowPendingIntent shadowPendingIntent = Shadows.shadowOf(actual);
    assertTrue(shadowPendingIntent.isBroadcastIntent());
    assertEquals(10100111, shadowPendingIntent.getRequestCode());
    assertEquals(PendingIntent.FLAG_UPDATE_CURRENT, shadowPendingIntent.getFlags());
    ComponentName actualComponentName = new ComponentName(application, CTLocationUpdateReceiver.class);
    assertEquals(CTGeofenceConstants.ACTION_LOCATION_RECEIVER,
            shadowPendingIntent.getSavedIntent().getAction());
    assertEquals(actualComponentName, shadowPendingIntent.getSavedIntent().getComponent());
}