test_class.declarator: abstractAlerterTest = new AbstractAlerterTest()
test_class.modifier: public
test_class.original_string: public AbstractAlerterTest abstractAlerterTest = new AbstractAlerterTest();
test_class.type: AbstractAlerterTest
test_class.var_name: abstractAlerterTest
test_class.declarator: elasticsearchAlerter
test_class.modifier: private
test_class.original_string: private ElasticsearchAlerter elasticsearchAlerter;
test_class.type: ElasticsearchAlerter
test_class.var_name: elasticsearchAlerter
test_class.declarator: alertSender
test_class.modifier: private
test_class.original_string: private AlertSender alertSender;
test_class.type: AlertSender
test_class.var_name: alertSender
test_class.file: stagemonitor-alerting/src/test/java/org/stagemonitor/alerting/alerter/ElasticsearchAlerterTest.java
test_class.identifier: ElasticsearchAlerterTest
test_class.superclass: extends AbstractElasticsearchTest
test_case.body: @Test
  	public void testAlert() throws Exception {
  		Incident incident = alertSender.sendTestAlert(abstractAlerterTest.createSubscription(elasticsearchAlerter), CheckResult.Status.ERROR);
  		refresh();
  		Collection<Incident> allIncidents = elasticsearchClient.getAll("/stagemonitor/alerts", 10, Incident.class);
  		Assert.assertEquals(1, allIncidents.size());
  		Assert.assertEquals(incident, allIncidents.iterator().next());
  	}
test_case.class_method_signature: ElasticsearchAlerterTest.testAlert()
test_case.full_signature: @Test public void testAlert()
test_case.identifier: testAlert
test_case.invocations: sendTestAlert createSubscription refresh getAll assertEquals size assertEquals next iterator
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAlert()
focal_class.declarator: corePlugin
focal_class.modifier: private
focal_class.original_string: private CorePlugin corePlugin;
focal_class.type: CorePlugin
focal_class.var_name: corePlugin
focal_class.declarator: httpClient
focal_class.modifier: private
focal_class.original_string: private HttpClient httpClient;
focal_class.type: HttpClient
focal_class.var_name: httpClient
focal_class.file: stagemonitor-alerting/src/main/java/org/stagemonitor/alerting/alerter/ElasticsearchAlerter.java
focal_class.identifier: ElasticsearchAlerter
focal_class.class_method_signature: ElasticsearchAlerter.ElasticsearchAlerter(ConfigurationRegistry configuration, HttpClient httpClient)
focal_class.full_signature: public  ElasticsearchAlerter(ConfigurationRegistry configuration, HttpClient httpClient)
focal_class.identifier: ElasticsearchAlerter
focal_class.modifiers: public
focal_class.parameters: (ConfigurationRegistry configuration, HttpClient httpClient)
focal_class.signature:  ElasticsearchAlerter(ConfigurationRegistry configuration, HttpClient httpClient)
focal_class.class_method_signature: ElasticsearchAlerter.alert(AlertArguments alertArguments)
focal_class.full_signature: @Override public void alert(AlertArguments alertArguments)
focal_class.identifier: alert
focal_class.modifiers: @Override public
focal_class.parameters: (AlertArguments alertArguments)
focal_class.return: void
focal_class.signature: void alert(AlertArguments alertArguments)
focal_class.class_method_signature: ElasticsearchAlerter.getAlerterType()
focal_class.full_signature: @Override public String getAlerterType()
focal_class.identifier: getAlerterType
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getAlerterType()
focal_class.class_method_signature: ElasticsearchAlerter.isAvailable()
focal_class.full_signature: @Override public boolean isAvailable()
focal_class.identifier: isAvailable
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAvailable()
focal_class.class_method_signature: ElasticsearchAlerter.getTargetLabel()
focal_class.full_signature: @Override public String getTargetLabel()
focal_class.identifier: getTargetLabel
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getTargetLabel()
focal_class.superclass: extends Alerter
focal_method.body: @Override
  	public void alert(AlertArguments alertArguments) {
  		String target = alertArguments.getSubscription().getTarget();
  		if (StringUtils.isEmpty(target)) {
  			target = "/stagemonitor/alerts";
  		}
  		httpClient.send(HttpRequestBuilder.<Integer>jsonRequest("POST", corePlugin.getElasticsearchUrl() + target, alertArguments.getIncident()).build());
  	}
focal_method.class_method_signature: ElasticsearchAlerter.alert(AlertArguments alertArguments)
focal_method.full_signature: @Override public void alert(AlertArguments alertArguments)
focal_method.identifier: alert
focal_method.invocations: getTarget getSubscription isEmpty send build jsonRequest getElasticsearchUrl getIncident
focal_method.modifiers: @Override public
focal_method.parameters: (AlertArguments alertArguments)
focal_method.return: void
focal_method.signature: void alert(AlertArguments alertArguments)