question: public void testWriteBit ( ) throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; BitOutputStream bOut = new BitOutputStream ( out ) ; bOut . writeBit ( true ) ; byte [ ] bytes = out . toByteArray ( ) ; Assert . assertEquals ( 0 , bytes . length ) ; bOut . close ( ) ; bytes = out . toByteArray ( ) ; Assert . assertEquals ( 1 , bytes [ 0 ] ) ; }
target:  Test single bit write.