@Test
public void listAppWithPageableTest() {

    PageableDTO pageableDTO = new PageableDTO();
    pageableDTO.setLimit(10);
    pageableDTO.setOffset(0);
    List<App> apps = new ArrayList<>();
    apps.add(app);
    AppRequestDTO appRequestDTO = new AppRequestDTO();
    Page<App> page = new PageImpl<>(apps);
    Mockito.when(this.appRepository.findAll(Mockito.any(Example.class), Mockito.any(Pageable.class)))
           .thenReturn(page);
    AppPage apiPageResp = appService.list(appRequestDTO, pageableDTO);
    assertEquals(1L, apiPageResp.getTotalElements());
    Mockito.verify(this.appRepository, Mockito.times(1))
           .findAll(Mockito.any(Example.class), Mockito.any(Pageable.class));
}