@Test
@SuppressWarnings("UnusedAssignment")
public void testInvalidAccept() throws JSONException, Exception
{

  // suppress logging in jersey to get rid of expected stack traces from test log
  java.util.logging.Logger.getLogger("org.glassfish.grizzly.servlet.ServletHandler").setLevel(Level.OFF);
  java.util.logging.Logger.getLogger("com.sun.jersey.spi.container.ContainerResponse").setLevel(Level.OFF);
  WebResource r = resource();
  String responseStr = "";
  try {
    responseStr = r.path(StramWebServices.PATH)
        .accept(MediaType.TEXT_PLAIN).get(String.class);
    fail("should have thrown exception on invalid accept");
  } catch (UniformInterfaceException ue) {
    ClientResponse response = ue.getResponse();
    assertEquals(Status.INTERNAL_SERVER_ERROR,
        response.getClientResponseStatus());
    StramTestSupport.checkStringMatch(
        "error string exists and shouldn't", "", responseStr);
  }
}