public class TempFileInputStreamTest extends JUnitTest {
public void testReadPastEOF() throws IOException {
File temp = File.createTempFile("test", null);
TempFileInputStream.writeToFileAndClose(new ByteArrayInputStream(new byte[1]), temp);
TempFileInputStream in = new TempFileInputStream(temp, false);
assertEquals(0, in.read());
assertEquals(-1, in.read());
assertEquals(-1, in.read());
assertEquals(-1, in.read());
in.close();
}