// Has a window, but policy says no - should disallow
Mockito.when(mockContext.getWindowManifestation()).thenReturn(mockView);
Mockito.when(mockView.getManifestedComponent()).thenReturn(mockComponent);
Mockito.when(mockPolicy.execute(Mockito.eq(compositionKey), Mockito.<PolicyContext>any()))
.thenReturn(new ExecutionResult(null, false, ""));
Assert.assertFalse(thisMenu.canHandle(mockContext));
// If policy allows, then canHandle should be true
Mockito.when(mockPolicy.execute(Mockito.eq(compositionKey), Mockito.<PolicyContext>any()))
.thenReturn(new ExecutionResult(null, true, ""));
Assert.assertTrue(thisMenu.canHandle(mockContext));