DefaultSpdyHeaders extends DefaultHeaders<CharSequence, CharSequence, SpdyHeaders> implements SpdyHeaders { @Override public String getAsString(CharSequence name) { return HeadersUtils.getAsString(this, name); } DefaultSpdyHeaders(); @SuppressWarnings("unchecked")  DefaultSpdyHeaders(boolean validate); @Override String getAsString(CharSequence name); @Override List<String> getAllAsString(CharSequence name); @Override Iterator<Entry<String, String>> iteratorAsString(); @Override boolean contains(CharSequence name, CharSequence value); @Override boolean contains(CharSequence name, CharSequence value, boolean ignoreCase);  }
@Test public void testStringKeyRetrievedAsAsciiString() { final SpdyHeaders headers = new DefaultSpdyHeaders(); final String method = "GET"; headers.add(":method", method); final String value = headers.getAsString(SpdyHeaders.HttpNames.METHOD.toString()); assertNotNull(value); assertEquals(method, value); final String value2 = headers.getAsString(SpdyHeaders.HttpNames.METHOD); assertNotNull(value2); assertEquals(method, value2); }
@Test public void testAsciiStringKeyRetrievedAsString() { final SpdyHeaders headers = new DefaultSpdyHeaders(); final String path = "/"; headers.add(SpdyHeaders.HttpNames.PATH, path); final String value = headers.getAsString(SpdyHeaders.HttpNames.PATH); assertNotNull(value); assertEquals(path, value); final String value2 = headers.getAsString(SpdyHeaders.HttpNames.PATH.toString()); assertNotNull(value2); assertEquals(path, value2); }