### Question:
ArgumentsParser { void configure(Configuration configuration) throws ParseException { if (has("standard")) { configuration.applyStandardLayout(get("standard")); } if (has("port")) { configuration.setSshPort(getPort("port", "SSH")); } if (has("bares")) { configuration.setRepositoriesHomeDir(getFile("bares")); } if (has("work")) { configuration.setWorkHomeDir(getFile("work")); } if (has("keys")) { configuration.setPublickeysRepositoryDir(getFile("keys")); } if (has("authentication")) { Authentication authentication = Authentication.NONE; String authValue = get("authentication"); authentication = Authentication.fromExternalValue(authValue); configuration.setAuthentication(authentication); } configuration.setRemoteAllowed(has("remote")); } ArgumentsParser(String[] args);   }### Answer:
@Test public void testConfigure_port_illegal_nonAllowed() throws Exception { int[] values = { -1, 0, 1024}; for (int port : values) { try { parse("--port " + port).configure(configuration); fail("Should have thrown a ParseException"); } catch (ParseException e) {} } }