METHOD_0 ( ) { when ( IDENT_0 . next ( ) ) . thenReturn ( IDENT_1 ) ; when ( IDENT_0 . hasNext ( ) ) . thenReturn ( false ) ; org . apache . IDENT_2 . IDENT_3 . Status status = IDENT_4 . process ( ) ; verify ( IDENT_0 , times ( 1 ) ) . hasNext ( ) ; verify ( IDENT_0 , times ( 0 ) ) . next ( ) ; verify ( IDENT_5 , times ( 1 ) ) . METHOD_1 ( METHOD_2 ( ) ) ; when ( IDENT_0 . next ( ) ) . thenReturn ( IDENT_1 ) ; "<AssertPlaceHolder>" ; } process ( ) { java . util . List < org . apache . IDENT_2 . IDENT_6 > IDENT_7 = new java . util . ArrayList < org . apache . IDENT_2 . IDENT_6 > ( ) ; kafka . message . Message message ; org . apache . IDENT_2 . IDENT_6 event ; java . nio . ByteBuffer buffer ; java . util . Map < java . lang . String , java . lang . String > headers ; byte [ ] bytes ; try { if ( it . hasNext ( ) ) { message = it . next ( ) . message ( ) ; event = new org . apache . IDENT_2 . event . METHOD_3 ( ) ; buffer = message . payload ( ) ; headers = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; headers . put ( STRING_0 , java . lang . String . valueOf ( java . lang . System . currentTimeMillis ( ) ) ) ; bytes = new byte [ buffer . METHOD_4 ( ) ] ; buffer . get ( bytes ) ; org . apache . IDENT_2 . source . kafka . IDENT_8 . log . debug ( STRING_1 , new java . lang . String ( bytes ) ) ; event . METHOD_5 ( bytes ) ; event . METHOD_6 ( headers ) ; IDENT_7 . add ( event ) ; } METHOD_7 ( ) . METHOD_1 ( IDENT_7 ) ; return Status . IDENT_9 ; } catch ( java . lang . Exception e ) { org . apache . IDENT_2 . source . kafka . IDENT_8 . log . error ( STRING_2 , e . getMessage ( ) ) ; return Status . IDENT_10 ; } }
org . junit . Assert . assertEquals ( Status . IDENT_9 , status )