void function ( ) { playerDao . savePlayer ( playerName ) ; Mockito . verify ( session , Mockito . times ( 1 ) ) . saveOrUpdate ( ( Player ) Mockito . any ( ) ) ; }
method under test : saveplayer string scenario : when valid player name is provided expectation : saveorupdate method will be called once to save to data concode_field_sep String playerName concode_elem_sep Session session concode_elem_sep Query query concode_elem_sep SessionFactory sessionFactory concode_elem_sep PlayerDao playerDao concode_field_sep void testFindPlayerWhenPlayerIsNotFound concode_elem_sep void testFindPlayerWhenPlayerIsFound concode_elem_sep void setUp concode_elem_sep void tearDown