	@Test
	void testSelect() {

		ServerSelector ssArt = new ServerSelector(() -> new AdaptiveRadixTree<>(APIVersionBinaryComparable.INSTANCE));
		ServerSelector ssRbt = new ServerSelector(() -> new TreeMap<>(APIVersionComparator.INSTANCE));

		// add API versions
		ssArt.addServer(new APIVersion(1, 1), "hosta:port");
		ssArt.addServer(new APIVersion(1, 2), "hostb:port");
		ssArt.addServer(new APIVersion(1, 3), "hostc:port");
		ssArt.addServer(new APIVersion(2, 0), "hostd:port");

		ssRbt.map().putAll(ssArt.map());

		// assert selection logic

		// exact
		assertEquals("hosta:port", ssArt.select("v1.1").orElse(""));

		// no minor version given
		assertEquals("hostc:port", ssArt.select("v1").orElse(""));

		// no major, minor given
		assertEquals("hostd:port", ssArt.select("").orElse(""));

		Iterator<Map.Entry<APIVersion, String>> it = ssArt.map().entrySet().iterator();
		for (Map.Entry<APIVersion, String> e : ssRbt.map().entrySet()) {
			assertEquals(it.next(), e);
		}
	}