urbanairship-core/src/test/java/com/urbanairship/remotedata/RemoteDataTest.java
@Test
    public void testRefreshInterval() {
        remoteData.init();
        clearInvocations(mockDispatcher);
        remoteData.setForegroundRefreshInterval(100000);


        activityMonitor.startActivity();
        activityMonitor.stopActivity();


        verify(mockDispatcher, times(1)).dispatch(Mockito.argThat(new ArgumentMatcher<JobInfo>() {
            @Override
            public boolean matches(JobInfo jobInfo) {
                return jobInfo.getAction().equals(RemoteDataJobHandler.ACTION_REFRESH);
            }
        }));



    }
/**
     * Test a foreground transition will not trigger a refresh if its before the foreground refresh
     * interval.
     */
Test a foreground transition will not trigger a refresh if its before the foreground refresh
interval.
Test a foreground transition will not trigger a refresh if its before the foreground refresh interval .
@Test
    public void testRefreshInterval() {
        remoteData.init();
        clearInvocations(mockDispatcher);
        remoteData.setForegroundRefreshInterval(100000);
        activityMonitor.startActivity();
        activityMonitor.stopActivity();
        verify(mockDispatcher, times(1)).dispatch(Mockito.argThat(new ArgumentMatcher<JobInfo>() {
            @Override
            public boolean matches(JobInfo jobInfo) {
                return jobInfo.getAction().equals(RemoteDataJobHandler.ACTION_REFRESH);
            }
        }));
    }
@ Test public void testRefreshInterval ( ) { remoteData . init ( ) ; clearInvocations ( mockDispatcher ) ; remoteData . setForegroundRefreshInterval ( 100000 ) ; activityMonitor . startActivity ( ) ; activityMonitor . stopActivity ( ) ; verify ( mockDispatcher , times ( 1 ) ) . dispatch ( Mockito . argThat ( new ArgumentMatcher < JobInfo > ( ) { @ Override public boolean matches ( JobInfo jobInfo ) { return jobInfo . getAction ( ) . equals ( RemoteDataJobHandler . ACTION_REFRESH ) ; } } ) ) ; }
Test a foreground transition will not trigger a refresh if its before the foreground refresh
 interval.
Test a foreground transition will not trigger a refresh if its before the foreground refresh interval .