@Test
public void test() {

	final List<SimpleEntry<Class<?>, Integer>> actual = new ArrayList<SimpleEntry<Class<?>, Integer>>();
	TypeHierarchyBrowser.INSTANCE.visit(this.startClass, this.mode, new Visitor<Class<?>>() {
		@Override
		public boolean visited(final Class<?> node, final int distance) {
			actual.add(new SimpleEntry<Class<?>, Integer>(node, distance));
			return TypeHierarchyBrowserTest.this.visitor.visited(node, distance);
		}
	}, this.maxDepth);
	if (this.mode == Mode.ALL)
		Assert.assertEquals(String.format("Failed to browser %s (%s) to %d", this.startClass, this.mode,
			this.maxDepth),
			new HashSet<Map.Entry<Class<?>, Integer>>(this.expectedClasses),
			new HashSet<Map.Entry<Class<?>, Integer>>(actual));
	else
		Assert.assertEquals(String.format("Failed to browser %s (%s) to %d", this.startClass, this.mode,
			this.maxDepth), this.expectedClasses, actual);
}