public async Task ToExcelDocument() { Pagination page = new Pagination(); page.Calculate(1); List <TestingEntity> entities = new List <TestingEntity>() { new TestingEntity() { } }; PaginatedCollection <TestingEntity> collection = new PaginatedCollection <TestingEntity>(page, entities); SpreadsheetDocument excel = await collection.ToExcelDocument(); Assert.True(!excel.IsNotValid()); }