@@ -0,0 +1,1413 @@
+package com.commercetools.pspadapter.tenant;%0A%0Aimport com.commercetools.pspadapter.payone.config.PayoneConfig;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.mockito.Mock;%0Aimport org.mockito.runners.MockitoJUnitRunner;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.mockito.Mockito.when;%0A%0A@RunWith(MockitoJUnitRunner.class)%0Apublic class TenantFactoryTest %7B%0A%0A    @Mock%0A    private PayoneConfig payoneConfig;%0A%0A    @Mock%0A    private TenantConfig tenantConfig;%0A%0A    private TenantFactory factory;%0A%0A    @Before%0A    public void setUp() throws Exception %7B%0A        when(payoneConfig.getApiUrl()).thenReturn(%22http://test.api.url%22);%0A        when(tenantConfig.getPayoneConfig()).thenReturn(payoneConfig);%0A        when(tenantConfig.getName()).thenReturn(%22testTenantName%22);%0A%0A        factory = new TenantFactory(%22testPayoneInterfaceName%22, tenantConfig);%0A    %7D%0A%0A    @Test%0A    public void getsPayoneInterfaceName() throws Exception %7B%0A        assertThat(factory.getPayoneInterfaceName()).isEqualTo(%22testPayoneInterfaceName%22);%0A    %7D%0A%0A    @Test%0A    public void getsPaymentHandlerUrl() throws Exception %7B%0A        assertThat(factory.getPaymentHandlerUrl()).contains(%22/testTenantName/%22);%0A    %7D%0A%0A    @Test%0A    public void getsPayoneNotificationUrl() throws Exception %7B%0A        assertThat(factory.getPayoneNotificationUrl()).contains(%22/testTenantName/%22);%0A    %7D%0A%0A%7D

add TenantFactoryTest