public void testDomainNotAutomaticallyPrefixedWithDot(){
  HttpCookie cookie=new HttpCookie("Foo","foo");
  cookie.setDomain("localhost");
  assertEquals("localhost",cookie.getDomain());
}

public void testDomainNotAutomaticallyPrefixedWithDot ( ) { HttpCookie cookie = new HttpCookie ( "Foo" , "foo" ) ; cookie . setDomain ( "localhost" ) ; assertEquals ( "localhost" , cookie . getDomain ( ) ) ; }
from the spec , " if an explicitly specified value does not start with a dot , the user agent supplies a leading dot . " . this prepending doesn ' t happen in setdomain .
