METHOD_0 ( ) { org . apache . avro . Schema reader = load ( STRING_0 ) ; org . apache . avro . Schema writer = load ( STRING_1 ) ; org . springframework . cloud . stream . schema . IDENT_0 client = mock ( org . springframework . cloud . stream . schema . IDENT_0 . class ) ; org . springframework . cloud . stream . codec . avro . IDENT_1 codec = new org . springframework . cloud . stream . codec . avro . METHOD_1 ( ) ; codec . METHOD_2 ( reader ) ; codec . METHOD_3 ( client ) ; when ( client . METHOD_4 ( any ( ) ) ) . thenReturn ( 2 ) ; when ( client . METHOD_5 ( eq ( 2 ) ) ) . thenReturn ( writer ) ; org . apache . avro . IDENT_2 . IDENT_3 record = new org . apache . avro . IDENT_2 . IDENT_4 . METHOD_6 ( writer ) ; record . put ( "name" , STRING_2 ) ; record . put ( STRING_3 , INT_0 ) ; record . put ( STRING_4 , STRING_5 ) ; record . put ( STRING_6 , STRING_7 ) ; byte [ ] results = codec . encode ( record ) ; org . apache . avro . IDENT_2 . IDENT_3 IDENT_5 = codec . decode ( results , org . apache . avro . IDENT_2 . IDENT_3 . class ) ; "<AssertPlaceHolder>" ; } get ( int ) { switch ( IDENT_6 ) { case 0 : return name ; case 1 : return IDENT_7 ; case 2 : return IDENT_8 ; default : throw new org . apache . avro . METHOD_7 ( STRING_8 ) ; } }
org . junit . Assert . assertEquals ( record . get ( "name" ) . toString ( ) , IDENT_5 . get ( "name" ) . toString ( ) )