### Question:
IntArrayVar extends AbstractVarType<Integer[]> { public static IntArrayVar intArrayVar(String id) { return new IntArrayVar(id); } private  IntArrayVar(String id); private  IntArrayVar(String id, String regex); static IntArrayVar intArrayVar(String id); static IntArrayVar intArrayVar(String id, String regex); @Override Integer[] convert(String value);  }### Answer:
@Test public void whenValueIsCorrectThenIntegerArrayIsReturned() { RestParser parser = parser("/users/update?ids={}", intArrayVar("userIds")); RestUrl url = parser.parse("http: assertThat(url, isValid()); assertThat((Integer[]) url.variable("userIds"), is(new Integer[] {-3, 8, 9})); }
@Test public void whenSomeValueIsNotIntegerThenUrlIsInvalid() { RestParser parser = parser("/users/update?ids={}", intArrayVar("userId")); RestUrl url = parser.parse("http: assertThat(url, isInvalid()); }
@Test public void whenVariableIsEmptyThenUrlIsInvalid() { RestParser parser = parser("/users/update?ids={}", intArrayVar("userId")); RestUrl url = parser.parse("http: assertThat(url, isInvalid()); }