public void run() {
panorama = newDefaultPanorama();
final double zoom = 1;
panorama.addZoomChangedHandler(new StreetviewZoomChangedHandler() {
public void onZoomChanged(StreetviewZoomChangedEvent event) {
assertEquals(panorama, event.getSender());
// 'If' instead of 'assert', as this event might be triggered few
// times before we invoke setPov() method
if (Math.abs(zoom - event.getZoom()) < 1e-2) {