void function ( ) { BattleShip loc0 = ( BattleShip ) beans . get ( CAPTAIN_BEAN ) ; loc0 . move ( ) ; BattleShip loc1 = ( BattleShip ) beans . get ( BATTLESHIP_BEAN ) ; verify ( loc1 ) . move ( ) ; loc0 . fire ( ) ; verify ( loc1 ) . fire ( ) ; }
this test asserts that when we use the move method on a captain bean client , it is internally calling move method on the battleship object . the adapter battlefishingboat converts the interface of the target class fishingboat into a suitable one expected by the client captain . concode_field_sep String BATTLESHIP_BEAN concode_elem_sep String CAPTAIN_BEAN concode_elem_sep Map<String,Object> beans concode_field_sep void setup