@@ -22,7 +22,7 @@ public void givenADocumentAndPageToKeep_whenSplit_thenReturnsOnlyKeptPage()
2222 throws IOException {
2323
2424 PageOptions pageOptions = new PageOptions .Builder ()
25- .pageIndexes (new Integer []{2 })
25+ .pageIndexes (new Integer []{ 2 })
2626 .operation (PageOptionsOperation .KEEP_ONLY )
2727 .build ();
2828
@@ -42,8 +42,8 @@ public void givenADocumentAndListOfPagesToKeep_whenSplit_thenReturnsOnlyKeptPage
4242 throws IOException {
4343
4444 List <Integer > pageNumbersToKeep = new ArrayList <>();
45+ pageNumbersToKeep .add (0 );
4546 pageNumbersToKeep .add (1 );
46- pageNumbersToKeep .add (2 );
4747
4848 PageOptions pageOptions = new PageOptions .Builder ()
4949 .pageIndexes (pageNumbersToKeep )
@@ -66,7 +66,7 @@ public void givenADocumentAndListOfPagesToRemove_whenSplit_thenReturnsOnlyNotRem
6666 throws IOException {
6767
6868 PageOptions pageOptions = new PageOptions .Builder ()
69- .pageIndexes (new Integer []{1 ,2 , 3 })
69+ .pageIndexes (new Integer []{ 0 , 1 ,2 })
7070 .operation (PageOptionsOperation .REMOVE )
7171 .build ();
7272
@@ -86,7 +86,7 @@ public void givenADocumentOtherThantAPdf_whenSplit_mustFail()
8686 throws IOException {
8787
8888 PageOptions pageOptions = new PageOptions .Builder ()
89- .pageIndexes (new Integer []{1 ,2 ,3 })
89+ .pageIndexes (new Integer []{ 1 ,2 ,3 })
9090 .operation (PageOptionsOperation .REMOVE )
9191 .build ();
9292
@@ -105,7 +105,7 @@ public void givenADocumentAndListPagesToRemoveAndMinPagesCondition_whenSplit_mus
105105 throws IOException {
106106
107107 PageOptions pageOptions = new PageOptions .Builder ()
108- .pageIndexes (new Integer []{1 })
108+ .pageIndexes (new Integer []{ 0 })
109109 .operation (PageOptionsOperation .REMOVE )
110110 .onMinPages (5 )
111111 .build ();
@@ -126,7 +126,7 @@ public void givenADocumentAndNegativeListPagesToKeep_whenSplit_thenReturnsOnlyKe
126126 throws IOException {
127127
128128 PageOptions pageOptions = new PageOptions .Builder ()
129- .pageIndexes (new Integer []{1 ,-2 ,-1 })
129+ .pageIndexes (new Integer []{ 0 ,-2 ,-1 })
130130 .operation (PageOptionsOperation .KEEP_ONLY )
131131 .build ();
132132
0 commit comments