MockitoAnnotations.initMocks(this);
when(mockIdentity.hasPermission(anyString(), anyString(), anyVararg()))
.thenReturn(true);
when(mockIdentity.hasPermission(anyString(), anyString())).thenReturn(
true);
ZanataCredentials credentials = new ZanataCredentials();
credentials.setUsername("testuser");
when(mockIdentity.getCredentials()).thenReturn(credentials);
SeamAutowire seamAutowire = getSeamAutowire();
seamAutowire.use("session", getSession()).use("identity", mockIdentity)
.useImpl(CopyTransServiceImpl.class)