@Test
public void testBinary() throws Exception {

    HttpServer server = HttpServer.create( new InetSocketAddress( 7212 ), 0 );
    server.createContext( "/test", new MyHandler2() );
    server.setExecutor( null ); // creates a default executor
    server.start();
    Thread.sleep( 10 );
    byte[] response = HTTP.getBytesWithHeaders(
            "http://localhost:7212/test",
            "application/java-archive",
            Maps.map(
                    "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
                    "Accept-Encoding", "gzip,deflate,sdch",
                    "Accept-Language", "en-US,en;q=0.8"
            )
    );
    boolean ok = true;
    ok &= response.length == 19 || die( "response is the wrong length" + response.length );
    for ( int index = 0; index < 19; index++ ) {
        ok &= response[ index ] == index || die( Str.sputs("index", index, "ressponse at index", response[index]) );
    }
    Thread.sleep( 10 );
    //uts( "binary test passed", ok );
    server.stop( 0 );
}