METHOD_0 ( ) { when ( IDENT_0 . METHOD_1 ( ) ) . thenReturn ( STRING_0 . getBytes ( ) ) ; org . apache . IDENT_1 . IDENT_2 . Status status = IDENT_3 . process ( ) ; verify ( IDENT_4 , times ( 1 ) ) . METHOD_2 ( ) ; verify ( IDENT_4 , times ( 1 ) ) . METHOD_3 ( ) ; verify ( IDENT_5 , times ( 1 ) ) . METHOD_4 ( ( ( kafka . IDENT_6 . IDENT_7 . IDENT_8 < java . lang . String , java . lang . String > ) ( any ( ) ) ) ) ; verify ( IDENT_9 , times ( 1 ) ) . commit ( ) ; verify ( IDENT_9 , times ( 0 ) ) . METHOD_5 ( ) ; verify ( IDENT_9 , times ( 1 ) ) . close ( ) ; "<AssertPlaceHolder>" ; } process ( ) { org . apache . IDENT_1 . IDENT_10 channel = METHOD_6 ( ) ; org . apache . IDENT_1 . IDENT_11 tx = channel . METHOD_2 ( ) ; try { tx . METHOD_7 ( ) ; org . apache . IDENT_1 . IDENT_12 event = channel . METHOD_3 ( ) ; if ( event == null ) { tx . commit ( ) ; return Status . IDENT_13 ; } IDENT_7 . METHOD_4 ( new kafka . IDENT_6 . IDENT_7 . IDENT_8 < java . lang . String , java . lang . String > ( IDENT_14 , new java . lang . String ( event . METHOD_1 ( ) ) ) ) ; org . apache . IDENT_1 . IDENT_15 . kafka . IDENT_16 . log . trace ( STRING_1 , event . METHOD_1 ( ) ) ; tx . commit ( ) ; return Status . IDENT_13 ; } catch ( java . lang . Exception e ) { try { tx . METHOD_5 ( ) ; return Status . IDENT_17 ; } catch ( java . lang . Exception IDENT_18 ) { org . apache . IDENT_1 . IDENT_15 . kafka . IDENT_16 . log . error ( STRING_2 , IDENT_18 ) ; } org . apache . IDENT_1 . IDENT_15 . kafka . IDENT_16 . log . error ( STRING_3 , e ) ; return Status . IDENT_17 ; } finally { tx . close ( ) ; } }
org . junit . Assert . assertEquals ( Status . IDENT_13 , status )