@@ -0,0 +1,3489 @@
+package com.poiji.deserialize;%0A%0Aimport com.poiji.bind.Poiji;%0Aimport com.poiji.deserialize.model.byid.Employee;%0Aimport com.poiji.exception.PoijiException;%0Aimport com.poiji.option.PoijiOptions;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0A%0Aimport java.io.File;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport static com.poiji.util.Data.unmarshallingDeserialize;%0Aimport static org.hamcrest.CoreMatchers.instanceOf;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.hamcrest.CoreMatchers.not;%0Aimport static org.hamcrest.CoreMatchers.notNullValue;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.junit.Assert.fail;%0A%0A/**%0A * Created by hakan on 17/01/2017.%0A */%0A@RunWith(Parameterized.class)%0Apublic class DeserializersPasswordTest %7B%0A%0A    private String path;%0A    private List%3CEmployee%3E expectedEmployess;%0A    private Class%3C?%3E expectedException;%0A    private int indexSheet;%0A%0A    public DeserializersPasswordTest(String path,%0A                                     List%3CEmployee%3E expectedEmployess,%0A                                     Class%3C?%3E expectedException,%0A                                     int indexSheet) %7B%0A        this.path = path;%0A        this.expectedEmployess = expectedEmployess;%0A        this.expectedException = expectedException;%0A        this.indexSheet = indexSheet;%0A    %7D%0A%0A    @Parameterized.Parameters(name = %22%7Bindex%7D: (%7B0%7D)=%7B1%7D%22)%0A    public static Iterable%3CObject%5B%5D%3E queries() %7B%0A        return Arrays.asList(new Object%5B%5D%5B%5D%7B%0A                %7B%22src/test/resources/employees.xlsx%22, unmarshallingDeserialize(), null, -1%7D,%0A                %7B%22src/test/resources/employees_sheet2.xlsx%22, unmarshallingDeserialize(), null, 1%7D,%0A                %7B%22src/test/resources/cloud.xls%22, unmarshallingDeserialize(), PoijiException.class, -1%7D,%0A                %7B%22src/test/resources/cloud%22, unmarshallingDeserialize(), PoijiException.class, -1%7D,%0A        %7D);%0A    %7D%0A%0A    @Test%0A    public void shouldMapExcelToJava() %7B%0A%0A        try %7B%0A%0A            List%3CEmployee%3E actualEmployees;%0A            if (indexSheet == 1) %7B%0A                PoijiOptions poijiOptions = PoijiOptions.PoijiOptionsBuilder.settings().sheetIndex(indexSheet).build();%0A                actualEmployees = Poiji.fromExcel(new File(path), Employee.class, poijiOptions);%0A            %7D else %7B%0A                actualEmployees = Poiji.fromExcel(new File(path), Employee.class);%0A            %7D%0A%0A            assertThat(actualEmployees, notNullValue());%0A            assertThat(actualEmployees.size(), not(0));%0A            assertThat(actualEmployees.size(), is(expectedEmployess.size()));%0A%0A            Employee actualEmployee1 = actualEmployees.get(0);%0A            Employee actualEmployee2 = actualEmployees.get(1);%0A            Employee actualEmployee3 = actualEmployees.get(2);%0A%0A            Employee expectedEmployee1 = expectedEmployess.get(0);%0A            Employee expectedEmployee2 = expectedEmployess.get(1);%0A            Employee expectedEmployee3 = expectedEmployess.get(2);%0A%0A            assertThat(actualEmployee1.toString(), is(expectedEmployee1.toString()));%0A            assertThat(actualEmployee2.toString(), is(expectedEmployee2.toString()));%0A            assertThat(actualEmployee3.toString(), is(expectedEmployee3.toString()));%0A        %7D catch (Exception e) %7B%0A            if (expectedException == null) %7B%0A                fail(e.getMessage());%0A            %7D else %7B%0A                assertThat(e, instanceOf(expectedException));%0A            %7D%0A        %7D%0A    %7D%0A%0A%7D%0A

add a test case for encrypted excel files