question: public void test_copyStream_fullBlock ( ) throws IOException { final String id = "test" ; final int version = 0 ; Random r = new Random ( ) ; final byte [ ] expected = new byte [ BLOCK_SIZE ] ; r . nextBytes ( expected ) ; assertEquals ( "nbytes" , expected . length , repo . copyStream ( id , version , new ByteArrayInputStream ( expected ) ) ) ; assertEquals ( "blockCount" , 1 , repo . getBlockCount ( id , version ) ) ; assertSameIterator ( "block identifiers" , new Long [ ] { 0L } , repo . blocks ( id , version ) ) ; assertEquals ( "data" , expected , read ( repo . inputStream ( id , version ) ) ) ; }
target:  Test copy of an stream containing exactly one block's data.