SlaCheckerEmailService { String getSubject(long incidentId) { Map<String, Object> params = new HashMap<>(); params.put("incidentId", incidentId); return MessageFormat.format(EMAIL_SUBJECT, params); }  void sendCloseIncidentEmail(long incidentId); void sendOpenIncidentEmail(long incidentId, List<Repository> ooslaRepositories); boolean shouldResendEmail(DateTime previousEmailDateTime);  }
@Test public void testGetSubject() { long incidentId = 0L; String expResult = "Out of SLA strings, incident #0"; String result = slaCheckerEmailService.getSubject(incidentId); assertEquals(expResult, result); }