test ( ) { org . hibernate . search . test . integration . IDENT_0 . client . service . IDENT_1 service = new org . hibernate . search . test . integration . IDENT_0 . client . service . METHOD_0 ( ) ; service . add ( 1 , "foo" ) ; service . add ( 2 , "bar" ) ; service . add ( 3 , STRING_0 ) ; "<AssertPlaceHolder>" ; } search ( java . lang . String ) { javax . persistence . IDENT_2 em = IDENT_3 . METHOD_1 ( ) ; try { javax . persistence . IDENT_4 tx = em . METHOD_2 ( ) ; tx . METHOD_3 ( ) ; org . hibernate . search . jpa . IDENT_5 IDENT_6 = org . hibernate . search . jpa . IDENT_7 . METHOD_4 ( em ) ; org . hibernate . search . query . IDENT_8 . IDENT_9 IDENT_10 = IDENT_6 . METHOD_5 ( ) . METHOD_6 ( ) . METHOD_7 ( org . hibernate . search . test . integration . IDENT_0 . client . model . IDENT_11 . class ) . get ( ) ; org . apache . lucene . search . Query IDENT_12 = IDENT_10 . METHOD_8 ( ) . METHOD_9 ( "name" ) . METHOD_10 ( IDENT_13 ) . METHOD_11 ( ) ; org . hibernate . search . jpa . IDENT_14 IDENT_15 = IDENT_6 . METHOD_12 ( IDENT_12 ) ; java . util . List < org . hibernate . search . test . integration . IDENT_0 . client . model . IDENT_11 > entities = IDENT_15 . METHOD_13 ( ) ; java . util . List < java . lang . Integer > IDENT_16 = entities . stream ( ) . map ( IDENT_11 :: getId ) . collect ( java . util . stream . IDENT_17 . toList ( ) ) ; tx . METHOD_14 ( ) ; return IDENT_16 ; } finally { em . close ( ) ; } }
org . junit . Assert . assertEquals ( 2 , service . search ( "foo" ) . size ( ) )