    @Test
    public void testOnDataPushed() {

        PersistenceStrategy<Data> persistenceStrategy = mock(PersistenceStrategy.class);

        BaseBatchingStrategy<Data, Batch<Data>> baseBatchingStrategy = new BaseBatchingStrategy<Data, Batch<Data>>(persistenceStrategy) {
            @Override
            public void flush(boolean forced) {

            }
        };

        ArrayList<Data> arrayList = Utils.fakeCollection(4);
        baseBatchingStrategy.onDataPushed(arrayList);
        baseBatchingStrategy.flush(false);
        when(persistenceStrategy.getData()).thenReturn(arrayList);
        when(persistenceStrategy.getDataSize()).thenReturn(arrayList.size());
        //verify that it gets called once
        verify(persistenceStrategy, times(1)).add(arrayList);
    }