### Question:
ByteLineReader { public int bytesAvailable() { return inStream.available(); } ByteLineReader(byte[] bytes); int getBytesRead(); int bytesAvailable(); byte[] readLine(boolean chop); byte[] readLine(); static boolean cmpBytes(byte[] a, byte[] b); static byte[] appendLF(byte[] bytesIn); static byte[] copyBytes(byte[] inBytes); static byte[] chopLine(byte[] lineIn); static byte[] trim(byte[] lineIn);  }### Answer:
@Test public void testBytesAvailable() { ByteLineReader br = new ByteLineReader(lines); assertEquals(18, br.bytesAvailable()); br.readLine(); assertEquals(16, br.bytesAvailable()); br.readLine(); assertEquals(12, br.bytesAvailable()); br.readLine(); assertEquals(7, br.bytesAvailable()); br.readLine(); assertEquals(2, br.bytesAvailable()); br.readLine(); assertEquals(1, br.bytesAvailable()); br.readLine(); assertEquals(0, br.bytesAvailable()); }