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 ( 100 , 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 , INT_2 , INT_3 , INT_4 , INT_5 , INT_6 , INT_7 , INT_8 , INT_6 , INT_9 , - 2 , - INT_10 , - INT_11 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , - INT_12 , 0 , INT_13 , - INT_14 , INT_5 , INT_15 , INT_16 , - INT_17 , - INT_18 , INT_19 , - INT_20 , INT_21 , - INT_22 , - 3 , - INT_23 , INT_24 } ; "<AssertPlaceHolder>" ; } METHOD_2 ( ) { return this . buffer ; }
org . junit . Assert . assertArrayEquals ( expected , actual )