AsyncReportStatusListener implements IAsyncReportListener { @Override public synchronized void updateGenerationStatus( final int generatedPage ) { this.generatedPage = generatedPage; this.requestedPage = 0; } AsyncReportStatusListener( final String path,
                                    final UUID uuid,
                                    final String mimeType,
                                    final List<? extends ReportProgressListener> callbackListeners ); @Override synchronized void setStatus( final AsyncExecutionStatus status ); @Override synchronized void setErrorMessage( final String errorMessage ); boolean isFirstPageMode(); synchronized void setRequestedPage( final int requestedPage ); @Override synchronized int getRequestedPage(); @Override synchronized void updateGenerationStatus( final int generatedPage ); @Override synchronized boolean isScheduled(); @Override synchronized void reportProcessingStarted( final ReportProgressEvent event ); @Override synchronized void reportProcessingUpdate( final ReportProgressEvent event ); @Override synchronized void reportProcessingFinished( final ReportProgressEvent event ); @Override String toString(); synchronized IAsyncReportState getState(); boolean isQueryLimitReached(); @Override void setIsQueryLimitReached( boolean isQueryLimitReached ); @Override int getTotalRows(); synchronized void cancel();  }
@Test public void updateGenerationStatus() throws Exception { final AsyncReportStatusListener listener = new AsyncReportStatusListener( "", UUID.randomUUID(), "", Collections.<ReportProgressListener>emptyList() ); listener.setRequestedPage( 500 ); listener.updateGenerationStatus( 500 ); assertEquals( 0, listener.getRequestedPage() ); }