### Question:
HTTPUtilitiesImplementation implements HTTPUtilities { public String valueFromHiddenInput(final String tokenName) throws GrinderException { return valueFromHiddenInput(tokenName, null); } HTTPUtilitiesImplementation(PluginProcessContext processContext); NVPair basicAuthorizationHeader(String userID, String password); HTTPResponse getLastResponse(); String valueFromLocationURI(final String tokenName); String valueFromBodyInput(final String tokenName); String valueFromBodyInput(String tokenName, String afterText); List<String> valuesFromBodyInput(final String tokenName); List<String> valuesFromBodyInput(String tokenName, String afterText); String valueFromHiddenInput(final String tokenName); String valueFromHiddenInput(String tokenName, String afterText); List<String> valuesFromHiddenInput(final String tokenName); List<String> valuesFromHiddenInput(String tokenName, String afterText); String valueFromBodyURI(final String tokenName); String valueFromBodyURI(final String tokenName, String afterText); List<String> valuesFromBodyURI(final String tokenName); List<String> valuesFromBodyURI(final String tokenName,
                                        String afterText);  }### Answer:
@Test public void testValueFromHiddenInput() throws Exception { final HTTPRequest request = new HTTPRequest(); final HTTPUtilities httpUtilities = new HTTPUtilitiesImplementation(m_pluginProcessContext); assertEquals("", httpUtilities.valueFromHiddenInput("foo")); final HTTPRequestHandler handler = new HTTPRequestHandler(); handler.start(); request.GET(handler.getURL()); assertEquals("", httpUtilities.valueFromHiddenInput("foo")); handler.setBody("<body><input type='hidden' name='foo'>foo</input></body>"); request.GET(handler.getURL()); assertEquals("", httpUtilities.valueFromHiddenInput("foo")); handler.setBody("<body><input name='foo' value='blah'>foo</input>" + "<input type='hidden' name='foo' value='bah'>foo</input></body>"); request.GET(handler.getURL()); assertEquals("bah", httpUtilities.valueFromHiddenInput("foo")); assertEquals("", httpUtilities.valueFromHiddenInput("bah")); assertEquals("bah", httpUtilities.valueFromHiddenInput("foo", "<body>")); assertEquals("", httpUtilities.valueFromHiddenInput("foo", "input")); assertEquals("", httpUtilities.valueFromHiddenInput("foo", "not there")); handler.shutdown(); }