METHOD_0 ( ) { final java . util . UUID IDENT_0 = java . util . UUID . METHOD_1 ( ) ; final org . talend . IDENT_1 . IDENT_2 . IDENT_3 . IDENT_4 IDENT_5 = new org . talend . IDENT_1 . IDENT_2 . IDENT_3 . METHOD_2 ( ) ; final org . talend . IDENT_1 . IDENT_3 . store . IDENT_6 repository = mock ( org . talend . IDENT_1 . IDENT_3 . store . IDENT_6 . class ) ; final org . talend . IDENT_1 . api . IDENT_3 . IDENT_7 IDENT_3 = new org . talend . IDENT_1 . api . IDENT_3 . METHOD_3 ( ) ; final org . talend . IDENT_1 . api . IDENT_3 . IDENT_8 IDENT_9 = mock ( org . talend . IDENT_1 . api . IDENT_3 . IDENT_8 . class ) ; when ( IDENT_9 . id ( ) ) . thenReturn ( STRING_0 ) ; when ( IDENT_9 . METHOD_4 ( ) ) . thenReturn ( IDENT_8 . IDENT_10 . id ( ) ) ; when ( repository . get ( eq ( STRING_0 ) , eq ( org . talend . IDENT_1 . api . IDENT_3 . IDENT_8 . class ) ) ) . thenReturn ( IDENT_9 ) ; IDENT_3 . METHOD_5 ( java . util . Arrays . asList ( IDENT_8 . IDENT_10 , IDENT_9 ) ) ; when ( repository . list ( eq ( org . talend . IDENT_1 . api . IDENT_3 . METHOD_3 . class ) ) ) . thenReturn ( java . util . stream . IDENT_11 . of ( IDENT_3 ) ) ; final org . talend . IDENT_1 . IDENT_2 . IDENT_3 . IDENT_4 . Result result = IDENT_5 . METHOD_6 ( repository , IDENT_0 ) ; "<AssertPlaceHolder>" ; verify ( repository , times ( 1 ) ) . add ( eq ( java . util . Collections . singletonList ( IDENT_9 ) ) ) ; verify ( IDENT_9 , times ( 1 ) ) . METHOD_7 ( eq ( IDENT_0 . toString ( ) ) ) ; } METHOD_6 ( org . talend . IDENT_1 . IDENT_3 . store . IDENT_6 , java . util . UUID ) { if ( repository . exist ( org . talend . IDENT_1 . api . IDENT_3 . METHOD_3 . class , METHOD_8 ( ) ) ) { org . talend . IDENT_1 . IDENT_2 . IDENT_3 . METHOD_2 . LOGGER . info ( STRING_1 ) ; METHOD_9 ( repository ) ; return Result . IDENT_12 ; } final java . util . concurrent . atomic . IDENT_13 IDENT_14 = new java . util . concurrent . atomic . METHOD_10 ( false ) ; repository . list ( org . talend . IDENT_1 . api . IDENT_3 . METHOD_3 . class ) . filter ( ( p ) -> ! ( IDENT_14 . get ( ) ) ) . METHOD_11 ( ( p ) -> { if ( repository . exist ( . class , METHOD_8 ( ) ) ) { org . talend . IDENT_1 . IDENT_2 . IDENT_3 . METHOD_2 . LOGGER . info ( STRING_2 ) ; METHOD_9 ( repository ) ; IDENT_14 . set ( true ) ; return ; } final Collection < org . talend . IDENT_1 . api . IDENT_3 . IDENT_15 > IDENT_16 = p . METHOD_12 ( ) . stream ( ) . filter ( ( s ) -> ! ( java . util . IDENT_17 . equals ( s , IDENT_8 . IDENT_10 ) ) ) . METHOD_13 ( ( s ) -> s . METHOD_7 ( IDENT_5 . toString ( ) ) ) . collect ( java . util . stream . IDENT_18 . toList ( ) ) ; repository . add ( IDENT_16 ) ; } ) ; return IDENT_14 . get ( ) ? Result . IDENT_12 : Result . IDENT_19 ; }
org . junit . Assert . assertEquals ( IDENT_4 . Result . IDENT_19 , result )