METHOD_0 ( ) { com . spotify . metrics . core . IDENT_0 < com . IDENT_1 . metrics . IDENT_2 > builder = mock ( com . spotify . metrics . core . IDENT_0 . class ) ; doReturn ( IDENT_3 ) . when ( metrics ) . get ( id ) ; doReturn ( true ) . when ( builder ) . METHOD_1 ( IDENT_3 ) ; "<AssertPlaceHolder>" ; verify ( builder , times ( 1 ) ) . METHOD_1 ( IDENT_3 ) ; verify ( registry , METHOD_2 ( ) ) . METHOD_3 ( id , IDENT_3 ) ; } METHOD_4 ( com . spotify . metrics . core . IDENT_4 , com . spotify . metrics . core . IDENT_0 ) { final com . IDENT_1 . metrics . IDENT_2 IDENT_3 = metrics . get ( name ) ; if ( IDENT_3 != null ) { if ( ! ( builder . METHOD_1 ( IDENT_3 ) ) ) { throw new java . lang . IllegalArgumentException ( ( name + STRING_0 ) ) ; } return ( ( T ) ( IDENT_3 ) ) ; } final T IDENT_5 = builder . METHOD_5 ( ) ; if ( IDENT_5 instanceof com . spotify . metrics . core . IDENT_6 ) { METHOD_6 ( name , ( ( com . spotify . metrics . core . IDENT_6 ) ( IDENT_5 ) ) ) ; return IDENT_5 ; } final com . IDENT_1 . metrics . IDENT_2 IDENT_7 = METHOD_3 ( name , IDENT_5 ) ; if ( IDENT_7 == null ) { return IDENT_5 ; } if ( ! ( builder . METHOD_1 ( IDENT_7 ) ) ) { throw new java . lang . IllegalArgumentException ( ( name + STRING_0 ) ) ; } return ( ( T ) ( IDENT_7 ) ) ; }
org . junit . Assert . assertEquals ( IDENT_3 , registry . METHOD_4 ( id , builder ) )