@Test
public void testFindsAction() {
Controller controller = mock( Controller.class );
RemoteAction remoteAction = mock( RemoteAction.class );
ActionDescriptor descriptor = mock( ActionDescriptor.class );
Action action = mock( Action.class );
when( descriptor.getAction() ).thenReturn( action );
when( remoteAction.getDescriptor() ).thenReturn( descriptor );
when( controller.findRemoteAction( "foo" ) ).thenReturn( remoteAction );
ActionOperatorImpl actionOperator = new ActionOperatorImpl( controller );
Action actualAction = actionOperator.getAction( "foo" );
assertSame( action, actualAction );
}