### Question:
UuidVar extends AbstractVarType<UUID> { public static UuidVar uuidVar(String id) { return new UuidVar(id); } private  UuidVar(String id); private  UuidVar(String id, String regex); static UuidVar uuidVar(String id); static UuidVar uuidVar(String id, String regex); @Override UUID convert(String value);  }### Answer:
@Test public void whenNegIntIsNotExpectedThenParse() { RestParser parser = parser("/users/{}", uuidVar("userId")); UUID uuid = UUID.randomUUID(); RestUrl url = parser.parse("http: assertThat(url, isValid()); assertThat((UUID) url.variable("userId"), is(uuid)); }
@Test public void whenVariableIsEmptyThenUrlIsInvalid() { RestParser parser = parser("/users/{}", uuidVar("userId")); RestUrl url = parser.parse("http: assertThat(url, isInvalid()); }