METHOD_0 ( ) { com . IDENT_0 . IDENT_1 . IDENT_2 . IDENT_3 . IDENT_4 serializer = mock ( com . IDENT_0 . IDENT_1 . IDENT_2 . IDENT_3 . IDENT_4 . class ) ; doReturn ( "foo" . getBytes ( ) ) . when ( serializer ) . serialize ( any ( com . IDENT_0 . IDENT_1 . IDENT_5 . class ) ) ; com . IDENT_0 . IDENT_1 . IDENT_2 . IDENT_3 . IDENT_6 buffer = new com . IDENT_0 . IDENT_1 . IDENT_2 . IDENT_3 . METHOD_1 ( 1 , true , serializer ) ; com . IDENT_0 . IDENT_1 . IDENT_5 IDENT_7 = mock ( com . IDENT_0 . IDENT_1 . IDENT_5 . class ) ; buffer . add ( IDENT_7 ) ; buffer . close ( ) ; byte [ ] actual = buffer . METHOD_2 ( ) . toByteArray ( ) ; byte [ ] expected = new byte [ ] { INT_0 , - INT_1 , 8 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , INT_2 , - INT_3 , - INT_4 , 7 , 0 , INT_5 , INT_6 , INT_7 , - INT_8 , 3 , 0 , 0 , 0 } ; "<AssertPlaceHolder>" ; } METHOD_2 ( ) { return this . buffer ; }
org . junit . Assert . assertArrayEquals ( expected , actual )