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 < byte [ ] , byte [ ] > ) ( any ( ) ) ) ) ; verify ( IDENT_8 , times ( 1 ) ) . commit ( ) ; verify ( IDENT_8 , times ( 0 ) ) . METHOD_5 ( ) ; verify ( IDENT_8 , times ( 1 ) ) . close ( ) ; "<AssertPlaceHolder>" ; } process ( ) { org . apache . IDENT_1 . IDENT_9 channel = METHOD_6 ( ) ; org . apache . IDENT_1 . IDENT_10 tx = channel . METHOD_2 ( ) ; try { tx . METHOD_7 ( ) ; org . apache . IDENT_1 . IDENT_11 event = channel . METHOD_3 ( ) ; if ( event == null ) { tx . commit ( ) ; return Status . IDENT_12 ; } java . lang . String line = new java . lang . String ( event . METHOD_1 ( ) ) ; java . util . HashMap < java . lang . String , java . lang . Object > map = org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_15 . METHOD_8 ( props , line ) ; org . apache . avro . IDENT_16 . IDENT_17 . IDENT_18 record = org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_15 . METHOD_9 ( org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_15 . METHOD_10 ( IDENT_19 ) , map ) ; byte [ ] IDENT_20 = org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_15 . METHOD_11 ( IDENT_21 , record , props ) ; IDENT_6 . METHOD_4 ( new kafka . IDENT_6 . IDENT_7 < byte [ ] , byte [ ] > ( this . IDENT_21 , IDENT_20 ) ) ; tx . commit ( ) ; return Status . IDENT_12 ; } catch ( java . lang . Exception e ) { try { tx . METHOD_5 ( ) ; return Status . IDENT_22 ; } catch ( java . lang . Exception IDENT_23 ) { org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_24 . log . error ( STRING_1 , IDENT_23 ) ; } org . IDENT_13 . IDENT_1 . IDENT_14 . avro . kafka . IDENT_24 . log . error ( STRING_2 , e ) ; return Status . IDENT_22 ; } finally { tx . close ( ) ; } }
org . junit . Assert . assertEquals ( Status . IDENT_12 , status )