SpaceBackend { public static SpaceBackend fromDefaults(String name) { return defaultBackends.get(name); } private  SpaceBackend(); String scheme(); String id(); String host(); int port(); boolean ssl(); boolean isMulti(); String name(); SpaceBackend name(String name); @Override String toString(); @Override boolean equals(Object object); StringBuilder urlBuilder(); String url(); String url(String path); static SpaceBackend fromUrl(String url); static SpaceBackend fromDefaults(String name); static SpaceBackend valueOf(String string); Optional<SpaceBackend> fromRequest(String requestHostAndPort); SpaceBackend fromBackendId(String backendId); static boolean isValid(String backendId); static void checkIsValid(String backendId); static final String API; static final String SPACEDOG; static SpaceBackend local; static SpaceBackend wwwLocal; static SpaceBackend staging; static SpaceBackend wwwStaging; static SpaceBackend production; static SpaceBackend wwwProduction; }
@Test public void testFromDefaults() { SpaceBackend backend = SpaceBackend.fromDefaults("production"); assertEquals("api.spacedog.io", backend.host()); assertEquals(443, backend.port()); assertEquals("https", backend.scheme()); assertEquals("spacedog", backend.id()); assertTrue(backend.ssl()); assertTrue(backend.isMulti()); assertEquals("https: assertEquals("https: }