### Question:
HttpAcceptHeaderProfile extends BasicProfile { public HttpAcceptHeaderProfile(String media, String[] params) { super("accept:" + media); for (int i = 0; i < params.length; i++) { params[i] = params[i].trim(); } this.params = params; } HttpAcceptHeaderProfile(String media, String[] params); String getParam(String name); double getParamNumeric(String name, double defaultVal);  }### Answer:
@Test public void testHttpAcceptHeaderProfile() { HttpAcceptHeaderProfile profile = new HttpAcceptHeaderProfile( "text/plain", new String[] { "q=0.9", "", " level=1 " }); assertEquals("Invalid profile name.", "accept:text/plain", profile .getName()); if (profile.getParamNumeric("q", 1.0) != 0.9) { fail("Invalid qvalue param value."); } if ((int) profile.getParamNumeric("level", 2.0) != 1) { fail("Invalid level param value."); } if (profile.getParamNumeric("xxx", 2.0) != 2.0) { fail("Invalid level param value."); } }