/**
*/
public class ResourceLineReaderTests extends TestCase {
public void testBadResource() throws Exception {
ResourceLineReader reader = new ResourceLineReader(new InputStreamResource(new InputStream() {
public int read() throws IOException {
throw new IOException("Foo");
}
}));
try {
reader.read();
fail("Expected InvalidBatchException");
} catch (InvalidBatchException e) {
// expected
assertTrue(e.getMessage().startsWith("Unable to read"));
}