@Test
public void performanceTest() {

    ServiceTemplateId id = new ServiceTemplateId("http://www.winery.opentosca.org/test/targetallocation/servicetemplates",
        "MinExternalConnectionsTest2", false);
    TopologyWrapper topology = new TopologyWrapper(repository.getElement(id).getTopologyTemplate());
    ConnectsToGraph connectsToGraph = new ConnectsToGraph(topology);
    KargerMinCutVariation kargerMinCutVariation = new KargerMinCutVariation(connectsToGraph);
    List<ConnectsToGraph> results = new ArrayList<>(kargerMinCutVariation.computeTargetLabelPartitions());
    // testing a monte carlo algorithm doesn't always work
    if (results.size() != 4 || results.get(0).getEdges().size() != 4) {
        LOGGER.debug("Monte Carlo Algorithm produced wrong result");
        return;
    }
    assertEquals(results.size(), 4);
    assertEquals(results.get(0).getEdges().size(), 4);
    assertEquals(results.get(1).getEdges().size(), 4);
    assertEquals(results.get(2).getEdges().size(), 4);
    assertEquals(results.get(3).getEdges().size(), 4);
}