ExcelSheetItemReader extends AbstractItemCountingItemStreamItemReader<T> implements
        IndexedResourceAwareItemStreamReader<T>,
        InitializingBean,
        ResourceAwareItemReaderItemStream<T>,
        ResourceAwareItemStreamReader<T> { @Override public void setResource(Resource resource) { this.resource = resource; }  @Override void afterPropertiesSet(); @Override T read(); @Override int getCurrentIndex(); boolean isEof(); @Override void setResource(Resource resource); void setRowMapper(RowMapper<? extends T> rowMapper); void setRowsToSkip(int rowsToSkip); void setSheetIndex(int sheetIndex);  }
@Test(expected = ItemStreamException.class) @Ignore public void testNotReadableResource() throws Exception { File directory = new ClassPathResource("log4j2.xml").getFile().getParentFile(); File file = File.createTempFile("test", ".xls", directory); file.deleteOnExit(); try (FileOutputStream output = new FileOutputStream(file)) { new HSSFWorkbook().write(output); reader.setResource(new FileSystemResource(file)); try (FileLock ignored = output.getChannel().lock()) { reader.open(new ExecutionContext()); } } }