### Question:
SmartVoltageLevelLayoutFactory implements VoltageLevelLayoutFactory { @Override public VoltageLevelLayout create(Graph graph) { return VoltageLevelLayoutFactorySmartSelector.findBest(network.getVoltageLevel(graph.getVoltageLevelInfos().getId())) .orElseThrow(() -> new PowsyblException("Voltage level layout factory not found")) .createFactory(network) .create(graph); } SmartVoltageLevelLayoutFactory(Network network); @Override VoltageLevelLayout create(Graph graph);  }### Answer:
@Test public void test() { Network network = Network.create("test", "code"); Substation s = network.newSubstation() .setId("S") .add(); VoltageLevel vl = s.newVoltageLevel() .setId("vl") .setNominalV(380) .setTopologyKind(TopologyKind.NODE_BREAKER) .add(); BusbarSection bbs = vl.getNodeBreakerView().newBusbarSection() .setId("bbs") .setNode(0) .add(); assertThat(VoltageLevelLayoutFactorySmartSelector.findBest(vl)) .isPresent() .get() .isInstanceOf(PositionByClusterVoltageLevelLayoutFactorySmartSelector.class); bbs.newExtension(BusbarSectionPositionAdder.class).withBusbarIndex(1).withSectionIndex(1).add(); assertThat(VoltageLevelLayoutFactorySmartSelector.findBest(vl)) .isPresent() .get() .isInstanceOf(PositionFromExtensionVoltageLevelLayoutFactorySmartSelector.class); }