Mockito.when(mockPersistenceProvider.getReferencedComponents(Mockito.any(AbstractComponent.class))).thenReturn(Collections.<AbstractComponent>emptyList());
Mockito.when(mockComponentRegistry.getViewInfos(Mockito.anyString(), Mockito.any(ViewType.class)))
.thenReturn(Collections.singleton(new ViewInfo(TableViewManifestation.class,"","",ViewType.EMBEDDED)));
Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(new ExecutionResult(null, true, ""));
(new PlatformAccess()).setPlatform(mockPlatform);
new ServiceAccess().bind(policyManager);
success = new ExecutionResult(new PolicyContext(), true, "success");
failure = new ExecutionResult(new PolicyContext(), false, "failure");