Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
2.7 kB
0
Indexable
Never
//    @Test
//    public void testPopulateFilterListWithPageTypeAsAuditExecutesHappyCase() {
//        when(fileSizeFilter.createFilter()).thenReturn(filter);
//        when(recordingDateFilter.createFilter(PAGE_TYPE_AUDIT)).thenReturn(filter);
//        when(auditStatusFilter.createFilter()).thenReturn(filter);
//        when(auditTypeFilter.createFilter()).thenReturn(filter);
//        when(customerIdFilter.createFilter()).thenReturn(filter);
//        when(loanIdFilter.createFilter()).thenReturn(filter);
//        final List<Filter> filterList = IntStream.range(0, 9)
//                .mapToObj(count -> filter)
//                .collect(Collectors.toList());
//        final FilterMetadataResponse filterMetadataResponse = new FilterMetadataResponse();
//        filterMetadataResponse.setFilterList(filterList);
//
//        assertEquals(filterMetadataService.populateFilterList(PAGE_TYPE_AUDIT), filterMetadataResponse);
//    }
//
//    @Test
//    public void testPopulateFilterListWithPageTypeAsYearlyAggregationExecutesHappyCase() {
//        when(recordingDateFilter.createFilter(PAGE_TYPE_YEARLY_AGGREGATION)).thenReturn(filter);
//        final List<Filter> filterList = IntStream.range(0, 4)
//                .mapToObj(count -> filter)
//                .collect(Collectors.toList());
//        final FilterMetadataResponse filterMetadataResponse = new FilterMetadataResponse();
//        filterMetadataResponse.setFilterList(filterList);
//
//        assertEquals(filterMetadataService.populateFilterList(PAGE_TYPE_YEARLY_AGGREGATION), filterMetadataResponse);
//    }
//
//    @Test
//    public void testPopulateFilterListWithPageTypeAsMonthlyAggregationExecutesHappyCase() {
//        when(monthFilter.createFilter()).thenReturn(filter);
//        final List<Filter> filterList = IntStream.range(0, 4)
//                .mapToObj(count -> filter)
//                .collect(Collectors.toList());
//        final FilterMetadataResponse filterMetadataResponse = new FilterMetadataResponse();
//        filterMetadataResponse.setFilterList(filterList);
//
//        assertEquals(filterMetadataService.populateFilterList(PAGE_TYPE_MONTHLY_AGGREGATION), filterMetadataResponse);
//    }

//        when(filterCriteriaList.stream()).thenReturn(Stream.of(verticalFilter, productFilter, agencyFilter, auditStatusFilter,
//                auditTypeFilter, customerIdFilter));

import static com.kotak.collection.reporting.constant.FilterMetadataApiConstant.PAGE_TYPE_MONTHLY_AGGREGATION;
import static com.kotak.collection.reporting.constant.FilterMetadataApiConstant.PAGE_TYPE_YEARLY_AGGREGATION;

import java.util.stream.Stream;

import java.util.HashMap;