VirtualHost implements Entrypoint { @Override public int priority() { return weight; } VirtualHost(String host, String path);  VirtualHost(String path); @Override String path(); @Override int priority(); @Override boolean accept(Request request);  }
@Test public void shouldHaveWeightEqualsTo1() { VirtualHost vHost = new VirtualHost("/"); Assert.assertEquals(1, vHost.priority()); }
@Test public void shouldHaveWeightEqualsTo5() { VirtualHost vHost = new VirtualHost("/path/to/my/api"); Assert.assertEquals(5, vHost.priority()); }
@Test public void shouldHaveWeightEqualsTo5_duplicatedPathSeparator() { VirtualHost vHost = new VirtualHost("/path Assert.assertEquals(5, vHost.priority()); }
@Test public void shouldHaveWeightEqualsTo1001() { VirtualHost vHost = new VirtualHost("api.gravitee.io", "/"); Assert.assertEquals(1001, vHost.priority()); }