public void performSortOperation(int option, List<File> pdf) {
        switch (option) {
            case DATE_INDEX:
                sortFilesByDateNewestToOldest(pdf);
                break;
            case NAME_INDEX:
                sortByNameAlphabetical(pdf);
                break;
            case SIZE_INCREASING_ORDER_INDEX:
                sortFilesBySizeIncreasingOrder(pdf);
                break;
            case SIZE_DECREASING_ORDER_INDEX:
                sortFilesBySizeDecreasingOrder(pdf);
                break;
        }
    }
@Test
    public void shouldReturnArraySortedByDescendingSize() {
        // given
        long[] sizes = {10000, 1000, 100, 50, 2000, 2500};
        for (int i = 0; i < sizes.length; i++)
            when(mFiles.get(i).length()).thenReturn(sizes[i]);

        File[] expected = new File[]{mFiles.get(0), mFiles.get(5), mFiles.get(4),
                mFiles.get(1), mFiles.get(2), mFiles.get(3)};

        // when
        mInstance.performSortOperation(mInstance.SIZE_DECREASING_ORDER_INDEX, mFiles);

        // then
        Assert.assertEquals(asList(expected), mFiles);
    }