### Question:
BillingUtils { public static Map<String, String> stringsToMap(String ... keyValues) { Map<String, String> map = new HashMap<>(); if (keyValues == null) { return map; } if (keyValues.length % 2 != 0) { throw new IllegalArgumentException("Missing key or value in arguments"); } for (int i = 1; i < keyValues.length; i+=2) { map.put(keyValues[i - 1], keyValues[i]); } return map; } private  BillingUtils(); static Map<String, String> stringsToMap(String ... keyValues); static List<String> getResourceAsList(String resourceName); static List<Class<?>> getModuleClassList(); static boolean classChildOf(Class<?> child, Class<?> parent); static ModuleType getModuleType(Class<?> moduleClass); static String getSimpleUserName(String username);  }### Answer:
@Test public void stringsToMap() { Map<String, String> map = BillingUtils.stringsToMap( "key1", "value1", "key2", "value2"); assertEquals(2, map.size()); assertEquals("value1", map.get("key1")); assertEquals("value2", map.get("key2")); try { map = BillingUtils.stringsToMap( "key1", "value1", "key2"); fail("Missed value2 is passed"); } catch (IllegalArgumentException e) { } }