@Test
public void validateLineChart() {
driver.get(webServerURL + ":" + webServerPort + "/highcharts.html");
WebElement highChartSVGElement = driver.findElement(By.id("linechart"));
LineChart chartObject = new LineChart(driver, highChartSVGElement);
assertThat(chartObject.isChartDisplayed(), is(equalTo(true)));
assertThat(chartObject.isLegendDisplayed(), is(equalTo(true)));
chartObject.hoverOverPointOfGraphAtXAxisLabel("Bananas");
assertThat(chartObject.isTooltipDisplayed(), is(equalTo(true)));
assertThat(chartObject.getToolTipLine(1), is(equalTo("Bananas")));
assertThat(chartObject.getToolTipLine(2), is(equalTo("Jane")));
assertThat(chartObject.getToolTipLine(3), is(equalTo(":")));
assertThat(chartObject.getToolTipLine(4), is(equalTo("0")));
assertThat(chartObject.getToolTipLine(5), is(equalTo("John")));
assertThat(chartObject.getToolTipLine(6), is(equalTo(":")));
assertThat(chartObject.getToolTipLine(7), is(equalTo("7")));
String[] EXPECTED_X_AXIS_LABELS = {"Apples", "Bananas", "Oranges"};
String[] EXPECTED_Y_AXIS_LABELS = {"0", "-2.5", "2.5", "5", "7.5", "Fruit eaten"};
assertThat(chartObject.getXAxisLabelsAsArray(), is(equalTo(EXPECTED_X_AXIS_LABELS)));
assertThat(chartObject.getYAxisLabelsAsArray(), is(equalTo(EXPECTED_Y_AXIS_LABELS)));
}