@Test
public void testGetViolationsWithPolicy5() {

    System.out.println("---testEvaluateWithPolicy5()---");
    /*
     * t-2, t-3, t-7 are breaches -> 1 violation (1st policy)
     */
    List<IMonitoringMetric> metrics = setUpWithPolicies();
    term.setPolicies(Arrays.asList(new IPolicy[] { 
            newPolicy("LATENCY", 3, new Date(10000)),
            newPolicy("LATENCY", 2, new Date(3000))
    }));
    List<IViolation> violations = evaluator.evaluate(contract, term, metrics, now);
    assertEquals(1, violations.size());
    assertViolations(violations, allMetrics.get(0), allMetrics.get(4), allMetrics.get(5));
    assertEquals(10000, violations.get(0).getPolicy().getTimeInterval().getTime());
}