### Question:
CollectionsToMapConverter { public Map<String, String> convert(final List<String> keys, final List<String> values) { if (keys == null || values == null || keys.size() != values.size()) { throw new IllegalArgumentException(String.format("Keys and values must be non null and the same size: keys:%s, values:%s", keys, values)); } final Map<String, String> converted = new HashMap<>(); for (int i = 0; i < keys.size(); i++) { final String key = keys.get(i); final String value = values.get(i); converted.put(key, value); } return converted; }  Map<String, String> convert(final List<String> keys, final List<String> values);  }### Answer:
@Test public void testValidConversion() { Assume.assumeTrue(isValid); final Map<String, String> actual = new CollectionsToMapConverter().convert(keys, values); Assert.assertThat(actual.size(), equalTo(expected.length)); Assert.assertThat(actual, allOf(expected)); }
@Test(expected = IllegalArgumentException.class) public void testInvalidConversionThrowsException() { Assume.assumeFalse(isValid); new CollectionsToMapConverter().convert(keys, values); }