Be consistent about testing package

This commit is contained in:
Max Dor
2018-12-25 20:26:20 +01:00
parent d160a44509
commit 950f7c931c
12 changed files with 69 additions and 46 deletions

View File

@@ -18,11 +18,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec; package io.kamax.mxisd.test.backend.exec;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
import io.kamax.matrix._MatrixID; import io.kamax.matrix._MatrixID;
import io.kamax.mxisd.UserIdType; import io.kamax.mxisd.UserIdType;
import io.kamax.mxisd.backend.exec.ExecAuthResult;
import io.kamax.mxisd.backend.exec.ExecAuthStore;
import io.kamax.mxisd.config.ExecConfig; import io.kamax.mxisd.config.ExecConfig;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Before; import org.junit.Before;

View File

@@ -18,10 +18,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec; package io.kamax.mxisd.test.backend.exec;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
import io.kamax.matrix.json.GsonUtil; import io.kamax.matrix.json.GsonUtil;
import io.kamax.mxisd.backend.exec.ExecDirectoryStore;
import io.kamax.mxisd.backend.exec.ExecStore;
import io.kamax.mxisd.config.ExecConfig; import io.kamax.mxisd.config.ExecConfig;
import io.kamax.mxisd.exception.InternalServerError; import io.kamax.mxisd.exception.InternalServerError;
import io.kamax.mxisd.http.io.UserDirectorySearchResult; import io.kamax.mxisd.http.io.UserDirectorySearchResult;

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec; package io.kamax.mxisd.test.backend.exec;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
@@ -26,6 +26,8 @@ import io.kamax.matrix.ThreePidMedium;
import io.kamax.matrix.json.GsonUtil; import io.kamax.matrix.json.GsonUtil;
import io.kamax.mxisd.UserID; import io.kamax.mxisd.UserID;
import io.kamax.mxisd.UserIdType; import io.kamax.mxisd.UserIdType;
import io.kamax.mxisd.backend.exec.ExecIdentityStore;
import io.kamax.mxisd.backend.exec.ExecStore;
import io.kamax.mxisd.backend.rest.LookupSingleResponseJson; import io.kamax.mxisd.backend.rest.LookupSingleResponseJson;
import io.kamax.mxisd.config.ExecConfig; import io.kamax.mxisd.config.ExecConfig;
import io.kamax.mxisd.exception.InternalServerError; import io.kamax.mxisd.exception.InternalServerError;

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec; package io.kamax.mxisd.test.backend.exec;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
@@ -27,6 +27,8 @@ import io.kamax.matrix.ThreePidMedium;
import io.kamax.matrix._ThreePid; import io.kamax.matrix._ThreePid;
import io.kamax.matrix.json.GsonUtil; import io.kamax.matrix.json.GsonUtil;
import io.kamax.mxisd.UserIdType; import io.kamax.mxisd.UserIdType;
import io.kamax.mxisd.backend.exec.ExecProfileStore;
import io.kamax.mxisd.backend.exec.ExecStore;
import io.kamax.mxisd.config.ExecConfig; import io.kamax.mxisd.config.ExecConfig;
import io.kamax.mxisd.profile.JsonProfileResult; import io.kamax.mxisd.profile.JsonProfileResult;
import org.junit.Test; import org.junit.Test;

View File

@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec; package io.kamax.mxisd.test.backend.exec;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
import io.kamax.matrix._MatrixID; import io.kamax.matrix._MatrixID;

View File

@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec.auth.input; package io.kamax.mxisd.test.backend.exec.auth.input;
import io.kamax.mxisd.backend.exec.ExecAuthStoreTest; import io.kamax.mxisd.test.backend.exec.ExecAuthStoreTest;
import java.util.Arrays; import java.util.Arrays;

View File

@@ -18,9 +18,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec.auth.input; package io.kamax.mxisd.test.backend.exec.auth.input;
import io.kamax.mxisd.backend.exec.ExecAuthStoreTest; import io.kamax.mxisd.test.backend.exec.ExecAuthStoreTest;
import java.util.HashMap; import java.util.HashMap;

View File

@@ -18,10 +18,10 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.exec.auth.input; package io.kamax.mxisd.test.backend.exec.auth.input;
import io.kamax.mxisd.backend.exec.ExecAuthStoreTest;
import io.kamax.mxisd.backend.exec.ExecStore; import io.kamax.mxisd.backend.exec.ExecStore;
import io.kamax.mxisd.test.backend.exec.ExecAuthStoreTest;
public class ExecAuthInputMultilinesTest extends ExecAuthStoreTest { public class ExecAuthInputMultilinesTest extends ExecAuthStoreTest {

View File

@@ -43,16 +43,25 @@ public class LdapAuthTest {
private static InMemoryDirectoryServer ds; private static InMemoryDirectoryServer ds;
private static ArrayList<String> dnList = new ArrayList<>(); private static ArrayList<String> dnList = new ArrayList<>();
private static String domain = "example.org";
private static String host = "localhost";
private static String mxisdCn = "cn=mxisd";
private static String mxisdPw = "mxisd";
private static String idType = "uid";
private static String idAttribute = "saMAccountName";
private static String userId = "john";
private static String userPw = "doe";
@BeforeClass @BeforeClass
public static void beforeClass() throws LDAPException { public static void beforeClass() throws LDAPException {
dnList.add("dc=1,dc=mxisd,dc=example,dc=org"); dnList.add("dc=1,dc=mxisd,dc=example,dc=org");
dnList.add("dc=2,dc=mxisd,dc=example,dc=org"); dnList.add("dc=2,dc=mxisd,dc=example,dc=org");
dnList.add("dc=3,dc=mxisd,dc=example,dc=org"); dnList.add("dc=3,dc=mxisd,dc=example,dc=org");
InMemoryListenerConfig lCfg = InMemoryListenerConfig.createLDAPConfig("localhost", 65001); InMemoryListenerConfig lCfg = InMemoryListenerConfig.createLDAPConfig(host, 65001);
InMemoryDirectoryServerConfig config = InMemoryDirectoryServerConfig config =
new InMemoryDirectoryServerConfig(dnList.get(0), dnList.get(1), dnList.get(2)); new InMemoryDirectoryServerConfig(dnList.get(0), dnList.get(1), dnList.get(2));
config.addAdditionalBindCredentials("cn=mxisd", "mxisd"); config.addAdditionalBindCredentials(mxisdCn, mxisdPw);
config.setListenerConfigs(lCfg); config.setListenerConfigs(lCfg);
ds = new InMemoryDirectoryServer(config); ds = new InMemoryDirectoryServer(config);
@@ -67,48 +76,48 @@ public class LdapAuthTest {
@Test @Test
public void singleDn() { public void singleDn() {
MatrixConfig mxCfg = new MatrixConfig(); MatrixConfig mxCfg = new MatrixConfig();
mxCfg.setDomain("example.org"); mxCfg.setDomain(domain);
mxCfg.build(); mxCfg.build();
LdapConfig cfg = new GenericLdapConfig(); LdapConfig cfg = new GenericLdapConfig();
cfg.getConnection().setHost("localhost"); cfg.getConnection().setHost(host);
cfg.getConnection().setPort(65001); cfg.getConnection().setPort(65001);
cfg.getConnection().setBaseDn(dnList.get(0)); cfg.getConnection().setBaseDn(dnList.get(0));
cfg.getConnection().setBindDn("cn=mxisd"); cfg.getConnection().setBindDn(mxisdCn);
cfg.getConnection().setBindPassword("mxisd"); cfg.getConnection().setBindPassword(mxisdPw);
LdapConfig.UID uid = new LdapConfig.UID(); LdapConfig.UID uid = new LdapConfig.UID();
uid.setType("uid"); uid.setType(idType);
uid.setValue("saMAccountName"); uid.setValue(idAttribute);
cfg.getAttribute().setUid(uid); cfg.getAttribute().setUid(uid);
cfg.build(); cfg.build();
LdapAuthProvider p = new LdapAuthProvider(cfg, mxCfg); LdapAuthProvider p = new LdapAuthProvider(cfg, mxCfg);
BackendAuthResult result = p.authenticate(MatrixID.from("john", "example.org").valid(), "doe"); BackendAuthResult result = p.authenticate(MatrixID.from(userId, domain).valid(), userPw);
assertFalse(result.isSuccess()); assertFalse(result.isSuccess());
} }
@Test @Test
public void multiDNs() { public void multiDNs() {
MatrixConfig mxCfg = new MatrixConfig(); MatrixConfig mxCfg = new MatrixConfig();
mxCfg.setDomain("example.org"); mxCfg.setDomain(domain);
mxCfg.build(); mxCfg.build();
LdapConfig cfg = new GenericLdapConfig(); LdapConfig cfg = new GenericLdapConfig();
cfg.getConnection().setHost("localhost"); cfg.getConnection().setHost(host);
cfg.getConnection().setPort(65001); cfg.getConnection().setPort(65001);
cfg.getConnection().setBaseDNs(dnList); cfg.getConnection().setBaseDNs(dnList);
cfg.getConnection().setBindDn("cn=mxisd"); cfg.getConnection().setBindDn(mxisdCn);
cfg.getConnection().setBindPassword("mxisd"); cfg.getConnection().setBindPassword(mxisdPw);
LdapConfig.UID uid = new LdapConfig.UID(); LdapConfig.UID uid = new LdapConfig.UID();
uid.setType("uid"); uid.setType(idType);
uid.setValue("saMAccountName"); uid.setValue(idAttribute);
cfg.getAttribute().setUid(uid); cfg.getAttribute().setUid(uid);
cfg.build(); cfg.build();
LdapAuthProvider p = new LdapAuthProvider(cfg, mxCfg); LdapAuthProvider p = new LdapAuthProvider(cfg, mxCfg);
BackendAuthResult result = p.authenticate(MatrixID.from("john", "example.org").valid(), "doe"); BackendAuthResult result = p.authenticate(MatrixID.from(userId, domain).valid(), userPw);
assertFalse(result.isSuccess()); assertFalse(result.isSuccess());
} }

View File

@@ -18,14 +18,16 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.rest; package io.kamax.mxisd.test.backend.rest;
import com.github.tomakehurst.wiremock.junit.WireMockRule; import com.github.tomakehurst.wiremock.junit.WireMockRule;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
import io.kamax.mxisd.backend.rest.RestDirectoryProvider;
import io.kamax.mxisd.config.MatrixConfig; import io.kamax.mxisd.config.MatrixConfig;
import io.kamax.mxisd.config.rest.RestBackendConfig; import io.kamax.mxisd.config.rest.RestBackendConfig;
import io.kamax.mxisd.http.io.UserDirectorySearchResult; import io.kamax.mxisd.http.io.UserDirectorySearchResult;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.ContentType;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
@@ -81,7 +83,7 @@ public class RestDirectoryProviderTest {
public void byNameFound() { public void byNameFound() {
stubFor(post(urlEqualTo(endpoint)) stubFor(post(urlEqualTo(endpoint))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(byNameResponse) .withBody(byNameResponse)
) )
); );
@@ -96,7 +98,7 @@ public class RestDirectoryProviderTest {
assertTrue(StringUtils.equals(MatrixID.asAcceptable(byNameId, domain).getId(), entry.getUserId())); assertTrue(StringUtils.equals(MatrixID.asAcceptable(byNameId, domain).getId(), entry.getUserId()));
verify(postRequestedFor(urlMatching(endpoint)) verify(postRequestedFor(urlMatching(endpoint))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(byNameRequest)) .withRequestBody(equalTo(byNameRequest))
); );
} }
@@ -105,7 +107,7 @@ public class RestDirectoryProviderTest {
public void byNameNotFound() { public void byNameNotFound() {
stubFor(post(urlEqualTo(endpoint)) stubFor(post(urlEqualTo(endpoint))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(byNameEmptyResponse) .withBody(byNameEmptyResponse)
) )
); );
@@ -115,7 +117,7 @@ public class RestDirectoryProviderTest {
assertTrue(result.getResults().isEmpty()); assertTrue(result.getResults().isEmpty());
verify(postRequestedFor(urlMatching(endpoint)) verify(postRequestedFor(urlMatching(endpoint))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(byNameRequest)) .withRequestBody(equalTo(byNameRequest))
); );
} }
@@ -124,7 +126,7 @@ public class RestDirectoryProviderTest {
public void byThreepidFound() { public void byThreepidFound() {
stubFor(post(urlEqualTo(endpoint)) stubFor(post(urlEqualTo(endpoint))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(new String(byThreepidResponse.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8)) .withBody(new String(byThreepidResponse.getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8))
) )
); );
@@ -139,7 +141,7 @@ public class RestDirectoryProviderTest {
assertTrue(StringUtils.equals(MatrixID.asAcceptable(byThreepidId, domain).getId(), entry.getUserId())); assertTrue(StringUtils.equals(MatrixID.asAcceptable(byThreepidId, domain).getId(), entry.getUserId()));
verify(postRequestedFor(urlMatching(endpoint)) verify(postRequestedFor(urlMatching(endpoint))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(byThreepidRequest)) .withRequestBody(equalTo(byThreepidRequest))
); );
} }
@@ -148,7 +150,7 @@ public class RestDirectoryProviderTest {
public void byThreepidNotFound() { public void byThreepidNotFound() {
stubFor(post(urlEqualTo(endpoint)) stubFor(post(urlEqualTo(endpoint))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(byThreepidEmptyResponse) .withBody(byThreepidEmptyResponse)
) )
); );
@@ -158,7 +160,7 @@ public class RestDirectoryProviderTest {
assertTrue(result.getResults().isEmpty()); assertTrue(result.getResults().isEmpty());
verify(postRequestedFor(urlMatching(endpoint)) verify(postRequestedFor(urlMatching(endpoint))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(byThreepidRequest)) .withRequestBody(equalTo(byThreepidRequest))
); );
} }

View File

@@ -18,12 +18,13 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
package io.kamax.mxisd.backend.rest; package io.kamax.mxisd.test.backend.rest;
import com.github.tomakehurst.wiremock.junit.WireMockRule; import com.github.tomakehurst.wiremock.junit.WireMockRule;
import io.kamax.matrix.MatrixID; import io.kamax.matrix.MatrixID;
import io.kamax.matrix._MatrixID; import io.kamax.matrix._MatrixID;
import io.kamax.matrix.json.GsonUtil; import io.kamax.matrix.json.GsonUtil;
import io.kamax.mxisd.backend.rest.RestProfileProvider;
import io.kamax.mxisd.config.rest.RestBackendConfig; import io.kamax.mxisd.config.rest.RestBackendConfig;
import io.kamax.mxisd.exception.InternalServerError; import io.kamax.mxisd.exception.InternalServerError;
import io.kamax.mxisd.profile.JsonProfileRequest; import io.kamax.mxisd.profile.JsonProfileRequest;

View File

@@ -1,13 +1,15 @@
package io.kamax.mxisd.backend.rest; package io.kamax.mxisd.test.backend.rest;
import com.github.tomakehurst.wiremock.junit.WireMockRule; import com.github.tomakehurst.wiremock.junit.WireMockRule;
import io.kamax.matrix.ThreePidMedium; import io.kamax.matrix.ThreePidMedium;
import io.kamax.mxisd.backend.rest.RestThreePidProvider;
import io.kamax.mxisd.config.MatrixConfig; import io.kamax.mxisd.config.MatrixConfig;
import io.kamax.mxisd.config.rest.RestBackendConfig; import io.kamax.mxisd.config.rest.RestBackendConfig;
import io.kamax.mxisd.lookup.SingleLookupReply; import io.kamax.mxisd.lookup.SingleLookupReply;
import io.kamax.mxisd.lookup.SingleLookupRequest; import io.kamax.mxisd.lookup.SingleLookupRequest;
import io.kamax.mxisd.lookup.ThreePidMapping; import io.kamax.mxisd.lookup.ThreePidMapping;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.http.entity.ContentType;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
@@ -17,6 +19,7 @@ import java.util.List;
import java.util.Optional; import java.util.Optional;
import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.client.WireMock.*;
import static junit.framework.TestCase.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
@@ -78,7 +81,7 @@ public class RestThreePidProviderTest {
public void lookupSingleFound() { public void lookupSingleFound() {
stubFor(post(urlEqualTo(lookupSinglePath)) stubFor(post(urlEqualTo(lookupSinglePath))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(lookupSingleFoundBody) .withBody(lookupSingleFoundBody)
) )
); );
@@ -91,7 +94,7 @@ public class RestThreePidProviderTest {
}); });
verify(postRequestedFor(urlMatching("/lookup/single")) verify(postRequestedFor(urlMatching("/lookup/single"))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(lookupSingleRequestBody)) .withRequestBody(equalTo(lookupSingleRequestBody))
); );
} }
@@ -100,7 +103,7 @@ public class RestThreePidProviderTest {
public void lookupSingleNotFound() { public void lookupSingleNotFound() {
stubFor(post(urlEqualTo(lookupSinglePath)) stubFor(post(urlEqualTo(lookupSinglePath))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(lookupSingleNotFoundBody) .withBody(lookupSingleNotFoundBody)
) )
); );
@@ -109,7 +112,7 @@ public class RestThreePidProviderTest {
assertTrue(!rep.isPresent()); assertTrue(!rep.isPresent());
verify(postRequestedFor(urlMatching("/lookup/single")) verify(postRequestedFor(urlMatching("/lookup/single"))
.withHeader("Content-Type", containing("application/json")) .withHeader("Content-Type", containing(ContentType.APPLICATION_JSON.getMimeType()))
.withRequestBody(equalTo(lookupSingleRequestBody)) .withRequestBody(equalTo(lookupSingleRequestBody))
); );
} }
@@ -118,14 +121,14 @@ public class RestThreePidProviderTest {
public void lookupBulkFound() { public void lookupBulkFound() {
stubFor(post(urlEqualTo(lookupBulkPath)) stubFor(post(urlEqualTo(lookupBulkPath))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(lookupBulkFoundBody) .withBody(lookupBulkFoundBody)
) )
); );
List<ThreePidMapping> mappings = p.populate(lookupBulkList); List<ThreePidMapping> mappings = p.populate(lookupBulkList);
assertNotNull(mappings); assertNotNull(mappings);
assertTrue(mappings.size() == 2); assertEquals(2, mappings.size());
assertTrue(StringUtils.equals(mappings.get(0).getMxid(), "@john:example.org")); assertTrue(StringUtils.equals(mappings.get(0).getMxid(), "@john:example.org"));
assertTrue(StringUtils.equals(mappings.get(1).getMxid(), "@jane:example.org")); assertTrue(StringUtils.equals(mappings.get(1).getMxid(), "@jane:example.org"));
} }
@@ -134,14 +137,14 @@ public class RestThreePidProviderTest {
public void lookupBulkNotFound() { public void lookupBulkNotFound() {
stubFor(post(urlEqualTo(lookupBulkPath)) stubFor(post(urlEqualTo(lookupBulkPath))
.willReturn(aResponse() .willReturn(aResponse()
.withHeader("Content-Type", "application/json") .withHeader("Content-Type", ContentType.APPLICATION_JSON.getMimeType())
.withBody(lookupBulkNotFoundBody) .withBody(lookupBulkNotFoundBody)
) )
); );
List<ThreePidMapping> mappings = p.populate(lookupBulkList); List<ThreePidMapping> mappings = p.populate(lookupBulkList);
assertNotNull(mappings); assertNotNull(mappings);
assertTrue(mappings.size() == 0); assertEquals(0, mappings.size());
} }
} }