@Test
public void testTranslate() throws IOException {

    String json = readFile("/violation_duke.json");
    IConstraintEvaluator constraintEvaluator = new SimpleConstraintEvaluator();
    
    ModacloudsTranslator translator = new ModacloudsTranslator(constraintEvaluator);
    Agreement agreement = new Agreement();
    GuaranteeTerm term = new GuaranteeTerm();
    term.setKpiName("responsetime");
    term.setName("rt");
    term.setServiceLevel("ResponseTimeViolated NOT_EXISTS");
    agreement.setGuaranteeTerms(Arrays.asList(new IGuaranteeTerm[] { term}));
    
    Map<IGuaranteeTerm, List<IMonitoringMetric>> map = translator.translate(agreement, json);
    
    assertEquals(1, map.get(term).size());
}