@Test
public void testStopGeofenceMonitoringTC2() {

    // when pending intent is not null
    GoogleGeofenceAdapter geofenceAdapter = new GoogleGeofenceAdapter(application);
    when(geofencingClient.removeGeofences(pendingIntent)).thenReturn(task);
    geofenceAdapter.stopGeofenceMonitoring(pendingIntent);
    try {
        verifyStatic(Tasks.class);
        Tasks.await(task);
        verify(pendingIntent).cancel();
    } catch (ExecutionException e) {
        e.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}