METHOD_0 ( ) { java . io . File IDENT_0 = io . cdap . plugin . batch . source . IDENT_1 . IDENT_2 . METHOD_1 ( ) ; try ( java . io . IDENT_3 writer = new java . io . METHOD_2 ( IDENT_0 ) ) { writer . write ( STRING_0 ) ; writer . write ( STRING_1 5 ) ; writer . write ( STRING_1 1 ) ; } java . util . Map < java . lang . String , java . lang . String > IDENT_4 = new ImmutableMap . Builder < java . lang . String , java . lang . String > ( ) . put ( Constants . IDENT_5 . IDENT_6 , STRING_2 ) . put ( STRING_3 , STRING_4 ) . put ( STRING_1 6 , STRING_1 3 ) . put ( Properties . File . IDENT_7 , IDENT_0 . getAbsolutePath ( ) ) . build ( ) ; io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . IDENT_10 source = new io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . METHOD_3 ( STRING_5 , new io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . METHOD_4 ( STRING_6 , io . cdap . cdap . IDENT_8 . api . batch . IDENT_11 . IDENT_12 , IDENT_4 , null ) ) ; java . lang . String IDENT_13 = STRING_1 4 ; io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . METHOD_3 IDENT_14 = new io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . METHOD_3 ( STRING_7 , io . cdap . cdap . IDENT_8 . mock . batch . IDENT_15 . METHOD_5 ( IDENT_13 ) ) ; io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . IDENT_16 config = io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . IDENT_16 . builder ( ) . METHOD_6 ( source ) . METHOD_6 ( IDENT_14 ) . METHOD_7 ( source . getName ( ) , IDENT_14 . getName ( ) ) . build ( ) ; io . cdap . cdap . IDENT_9 . IDENT_17 . IDENT_18 < io . cdap . cdap . IDENT_8 . IDENT_9 . v2 . IDENT_16 > IDENT_19 = new io . cdap . cdap . IDENT_9 . IDENT_17 . METHOD_8 ( IDENT_20 , config ) ; io . cdap . cdap . IDENT_9 . id . IDENT_21 IDENT_22 = IDENT_23 . IDENT_24 . app ( STRING_8 ) ; io . cdap . cdap . test . IDENT_25 IDENT_26 = METHOD_9 ( IDENT_22 , IDENT_19 ) ; IDENT_26 . METHOD_10 ( IDENT_27 . IDENT_28 ) . METHOD_11 ( IDENT_29 . IDENT_30 , 5 , TimeUnit . IDENT_31 ) ; io . cdap . cdap . test . IDENT_32 < io . cdap . cdap . api . dataset . table . IDENT_33 > IDENT_34 = METHOD_12 ( IDENT_13 ) ; java . util . Map < java . lang . String , java . lang . Integer > expected = new java . util . HashMap ( ) ; expected . put ( STRING_1 2 , 3 ) ; expected . put ( STRING_1 , 1 ) ; expected . put ( STRING_9 , 1 ) ; java . util . Map < java . lang . String , java . lang . Integer > actual = new java . util . HashMap ( ) ; for ( io . cdap . cdap . api . data . format . IDENT_35 record : io . cdap . cdap . IDENT_8 . mock . batch . IDENT_15 . METHOD_13 ( IDENT_34 ) ) { java . lang . String body = record . get ( STRING_1 0 ) ; if ( actual . containsKey ( body ) ) { actual . put ( body , ( ( actual . get ( body ) ) + 1 ) ) ; } else { actual . put ( body , 1 ) ; } } "<AssertPlaceHolder>" ; } METHOD_13 ( org . apache . IDENT_36 . IDENT_37 . IDENT_38 ) { org . apache . avro . Schema IDENT_39 = new org . apache . avro . Schema . METHOD_14 ( ) . parse ( io . cdap . plugin . batch . IDENT_40 . IDENT_41 . toString ( ) ) ; java . util . Map < java . lang . String , java . lang . Integer > IDENT_42 = new java . util . HashMap ( ) ; for ( org . apache . IDENT_36 . IDENT_37 . IDENT_38 file : IDENT_43 . list ( ) ) { java . lang . String IDENT_44 = file . getName ( ) ; if ( IDENT_44 . METHOD_15 ( STRING_10 ) ) { org . apache . avro . io . IDENT_45 < org . apache . avro . IDENT_46 . IDENT_47 > IDENT_48 = new org . apache . avro . IDENT_46 . METHOD_16 ( IDENT_39 ) ; org . apache . avro . file . IDENT_49 < org . apache . avro . IDENT_46 . IDENT_47 > IDENT_50 = new org . apache . avro . file . METHOD_17 ( file . METHOD_18 ( ) , IDENT_48 ) ; for ( org . apache . avro . IDENT_46 . IDENT_47 record : IDENT_50 ) { IDENT_42 . put ( record . get ( STRING_11 ) . toString ( ) , ( ( java . lang . Integer ) ( record . get ( STRING_12 ) ) ) ) ; } IDENT_50 . close ( ) ; } else if ( IDENT_44 . METHOD_15 ( STRING_13 ) ) { org . apache . hadoop . fs . Path IDENT_51 = new org . apache . hadoop . fs . Path ( file . toString ( ) ) ; org . apache . IDENT_52 . avro . IDENT_53 . Builder < org . apache . avro . IDENT_46 . IDENT_47 > IDENT_54 = org . apache . IDENT_52 . avro . IDENT_53 . builder ( IDENT_51 ) ; org . apache . IDENT_52 . hadoop . IDENT_55 < org . apache . avro . IDENT_46 . IDENT_47 > reader = IDENT_54 . build ( ) ; org . apache . avro . IDENT_46 . IDENT_47 record = reader . read ( ) ; while ( record != null ) { IDENT_42 . put ( record . get ( STRING_11 ) . toString ( ) , ( ( java . lang . Integer ) ( record . get ( STRING_12 ) ) ) ) ; record = reader . read ( ) ; } } } return IDENT_42 ; }
org . junit . Assert . assertEquals ( expected , actual )