@Test public void testGetNonExistingIncindent() throws Exception { assertThat(elasticsearchIncidentRepository.getIncidentByCheckId("test 1")).isNull(); }
@Override public Incident getIncidentByCheckId(String checkId) { return elasticsearchClient.getObject(BASE_URL + "/" + getEsId(checkId), Incident.class); }
ElasticsearchIncidentRepository implements IncidentRepository { @Override public Incident getIncidentByCheckId(String checkId) { return elasticsearchClient.getObject(BASE_URL + "/" + getEsId(checkId), Incident.class); } }
ElasticsearchIncidentRepository implements IncidentRepository { @Override public Incident getIncidentByCheckId(String checkId) { return elasticsearchClient.getObject(BASE_URL + "/" + getEsId(checkId), Incident.class); } ElasticsearchIncidentRepository(ElasticsearchClient elasticsearchClient); }
ElasticsearchIncidentRepository implements IncidentRepository { @Override public Incident getIncidentByCheckId(String checkId) { return elasticsearchClient.getObject(BASE_URL + "/" + getEsId(checkId), Incident.class); } ElasticsearchIncidentRepository(ElasticsearchClient elasticsearchClient); @Override Collection<Incident> getAllIncidents(); @Override Incident getIncidentByCheckId(String checkId); @Override boolean deleteIncident(Incident incident); @Override boolean createIncident(Incident incident); @Override boolean updateIncident(Incident incident); @Override void clear(); }
ElasticsearchIncidentRepository implements IncidentRepository { @Override public Incident getIncidentByCheckId(String checkId) { return elasticsearchClient.getObject(BASE_URL + "/" + getEsId(checkId), Incident.class); } ElasticsearchIncidentRepository(ElasticsearchClient elasticsearchClient); @Override Collection<Incident> getAllIncidents(); @Override Incident getIncidentByCheckId(String checkId); @Override boolean deleteIncident(Incident incident); @Override boolean createIncident(Incident incident); @Override boolean updateIncident(Incident incident); @Override void clear(); static final String BASE_URL; }