@Test
public void testAddAllGeofenceTC3() {

    // when fence list is not empty
    List<CTGeofence> ctGeofences = CTGeofence.from(GeofenceJSON.getGeofence());
    GoogleGeofenceAdapter geofenceAdapter = new GoogleGeofenceAdapter(application);
    when(geofencingClient.addGeofences(any(GeofencingRequest.class), any(PendingIntent.class)))
            .thenReturn(task);
    geofenceAdapter.addAllGeofence(ctGeofences, onSuccessListener);
    try {
        verifyStatic(Tasks.class);
        Tasks.await(task);
        verify(onSuccessListener).onSuccess(null);
    } catch (ExecutionException e) {
        e.printStackTrace();
    } catch (InterruptedException e) {
        e.printStackTrace();
    }
}