@Test
  public void testMaxAssociatedResources() throws Exception {
    pushStrategy.setMaxAssociatedResources(1);
    connector.addConnectionFactory(defaultFactory);
    connector.setDefaultProtocol(defaultFactory.getProtocol()); // TODO I don't think this is right

    Session session = sendMainRequestAndCSSRequest(null);

    sendRequest(session, associatedJSRequestHeaders, null, null);

    run2ndClientRequests(false, true);
  }
 @Before
 public void setUp() throws Exception {
   serverAddress = createServer();
   pushStrategy = new ReferrerPushStrategy();
   pushStrategy.setReferrerPushPeriod(referrerPushPeriod);
   defaultFactory =
       new HTTPSPDYServerConnectionFactory(version, new HttpConfiguration(), pushStrategy);
   connector.addConnectionFactory(defaultFactory);
   if (connector.getConnectionFactory(NPNServerConnectionFactory.class) != null)
     connector
         .getConnectionFactory(NPNServerConnectionFactory.class)
         .setDefaultProtocol(defaultFactory.getProtocol());
   else connector.setDefaultProtocol(defaultFactory.getProtocol());
   mainRequestHeaders = createHeadersWithoutReferrer(mainResource);
   associatedCSSRequestHeaders = createHeaders(cssResource);
   associatedJSRequestHeaders = createHeaders("/application.js");
 }
 @Test
 public void testUserAgentBlackList() throws Exception {
   pushStrategy.setUserAgentBlacklist(Arrays.asList(".*(?i)firefox/16.*"));
   sendMainRequestAndCSSRequest(null);
   run2ndClientRequests(false, false);
 }