### Question:
GeofencingRequest { public List<Geofence> getGeofences() { return geofences; } private  GeofencingRequest(List<Geofence> geofences); List<Geofence> getGeofences();  }### Answer:
@Test public void getGeofences_shouldReturnSingleGeofence() throws Exception { Geofence geofence = new Geofence.Builder().setRequestId("test_id").build(); GeofencingRequest request = new GeofencingRequest.Builder().addGeofence(geofence).build(); assertThat(request.getGeofences().get(0).getRequestId()).isEqualTo("test_id"); }
@Test public void getGeofences_shouldReturnMultipleGeofences() throws Exception { Geofence geofence1 = new Geofence.Builder().setRequestId("test_id_1").build(); Geofence geofence2 = new Geofence.Builder().setRequestId("test_id_2").build(); GeofencingRequest request = new GeofencingRequest.Builder() .addGeofence(geofence1) .addGeofence(geofence2) .build(); assertThat(request.getGeofences().get(0).getRequestId()).isEqualTo("test_id_1"); assertThat(request.getGeofences().get(1).getRequestId()).isEqualTo("test_id_2"); }