@Test
public void testSetsOptionsWhenGetLocation() {
RemoteObject remoteObject = environment.getServiceObject();
GeolocationImpl geolocation = new GeolocationImpl();
GeolocationOptions options = new GeolocationOptions();
GeolocationListener listener = mock( GeolocationListener.class );
geolocation.addGeolocationListener( listener );
geolocation.determineCurrentPosition( options );
verify( remoteObject ).set( "needsPosition", "ONCE" );
verify( remoteObject ).set( "frequency", options.getFrequency() );
verify( remoteObject ).set( "maximumAge", options.getMaximumAge() );
verify( remoteObject ).set( "highAccuracy", options.isHighAccuracyEnabled() );
}