NdsBeisEsb/src/test/java/com/northgateps/nds/beis/esb/StatisticsRouteTest.java
// now override any method call to the db, to return mocked data
now override any method call to the db, to return mocked data
now override any method call to the db to return mocked data
@Override
                    protected FetchResult fetch(String collectionName, PersistenceQuery query, String sortField, int order, int skip, int limit) {
                        if ("NDS_EVENTS_DATA".equals(collectionName)) {
                            visits.incr("fetch-event");
                            FetchResult result = new FetchResult();
                            addResultRecords(result);
                            result.setFailures(new ArrayList<NdsDbData>());
                            result.setMetadata(new NdsDbMetadata());                            
                            return result;
                        } else {
                            return null;
                        }
                    }
@ Override protected FetchResult fetch ( String collectionName , PersistenceQuery query , String sortField , int order , int skip , int limit ) { if ( "NDS_EVENTS_DATA" . equals ( collectionName ) ) { visits . incr ( "fetch-event" ) ; FetchResult result = new FetchResult ( ) ; addResultRecords ( result ) ; result . setFailures ( new ArrayList < NdsDbData > ( ) ) ; result . setMetadata ( new NdsDbMetadata ( ) ) ; return result ; } else { return null ; } }
now override any method call to the db, to return mocked data
now override any method call to the db to return mocked data