METHOD_0 ( ) { final java . lang . String IDENT_0 = STRING_0 ; final org . apache . ambari . server . IDENT_1 . entities . IDENT_2 entity = new org . apache . ambari . server . IDENT_1 . entities . METHOD_1 ( ) ; entity . METHOD_2 ( IDENT_0 ) ; javax . persistence . IDENT_3 < org . apache . ambari . server . IDENT_1 . entities . METHOD_1 > query = METHOD_3 ( javax . persistence . IDENT_3 . class ) ; expect ( IDENT_4 . METHOD_4 ( eq ( STRING_1 ) , eq ( org . apache . ambari . server . IDENT_1 . entities . METHOD_1 . class ) ) ) . andReturn ( query ) ; expect ( query . METHOD_5 ( STRING_2 , IDENT_0 ) ) . andReturn ( query ) ; expect ( query . METHOD_6 ( ) ) . andReturn ( entity ) ; replay ( IDENT_4 , query ) ; final org . apache . ambari . server . IDENT_1 . dao . IDENT_5 dao = new org . apache . ambari . server . IDENT_1 . dao . METHOD_7 ( ) ; dao . IDENT_6 = IDENT_6 ; final org . apache . ambari . server . IDENT_1 . entities . METHOD_1 result = dao . METHOD_8 ( IDENT_0 ) ; "<AssertPlaceHolder>" ; verify ( IDENT_6 , IDENT_4 , query ) ; } METHOD_8 ( java . lang . String ) { final javax . persistence . IDENT_3 < org . apache . ambari . server . IDENT_1 . entities . METHOD_1 > query = IDENT_6 . get ( ) . METHOD_4 ( STRING_1 , org . apache . ambari . server . IDENT_1 . entities . METHOD_1 . class ) ; query . METHOD_5 ( STRING_2 , IDENT_0 . toLowerCase ( ) ) ; try { return query . METHOD_6 ( ) ; } catch ( javax . persistence . IDENT_7 e ) { return null ; } }
org . junit . Assert . assertSame ( entity , result )