Topology { static Topology create(int u, int[] vs, List<Edge> es, Configuration c) { if (c.type() == Implicit) throw new IllegalArgumentException("configuration must be explicit, @TH1/@TH2 instead of @/@@"); if (c.type() == Tetrahedral) { return tetrahedral(u, vs, c); } else if (c.type() == DoubleBond) { return trigonal(u, vs, c); } else if (c.type() == ExtendedTetrahedral) { return extendedTetrahedral(u, vs, c); } else if (c.type() == SquarePlanar) { return squarePlanar(u, vs, c); } else if (c.type() == TrigonalBipyramidal) { return trigonalBipyramidal(u, vs, c); } else if (c.type() == Configuration.Type.Octahedral) { return octahedral(u, vs, c); } return unknown(); }    }
@Test(expected = IllegalArgumentException.class) public void create_AntiClockwise() { Topology.create(0, new int[0], Collections .<Edge>emptyList(), Configuration.ANTI_CLOCKWISE); }
@Test(expected = IllegalArgumentException.class) public void create_Clockwise() { Topology.create(0, new int[0], Collections .<Edge>emptyList(), Configuration.CLOCKWISE); }