use of com.icthh.xm.commons.config.client.config.XmConfigProperties in project xm-ms-entity by xm-online.
the class MailServiceUnitTest method before.
@Before
public void before() {
tenantConfigService = new XmEntityTenantConfigService(new XmConfigProperties(), tenantContextHolder);
MockitoAnnotations.initMocks(this);
when(tenantContextHolder.getTenantKey()).thenReturn("XM");
when(tenantContextHolder.getPrivilegedContext()).thenReturn(mock(PrivilegedTenantContext.class));
TenantContext mock = mock(TenantContext.class);
when(mock.getTenantKey()).thenReturn(java.util.Optional.of(TenantKey.valueOf("XM")));
when(tenantContextHolder.getContext()).thenReturn(mock);
}
Aggregations