package com.github.bot.curiosone.core.nlp;

// SUPPRESS CHECKSTYLE AvoidStarImport
import static org.junit.Assert.*;

import java.util.Arrays;

import org.junit.Test;

public class ParseTableTest {
  @Test
  public void testInstantiation() {
    ParseTable classUnderTest = new ParseTable(
        Token.tokenize("what is an apple")
    );
    System.out.println(classUnderTest);

    classUnderTest = new ParseTable(
        Token.tokenize("what is a golden apple")
    );
    System.out.println(classUnderTest);
  }
}

@@ -111,16 +111,105 @@
 ert.*;%0A%0A
+// SUPPRESS CHECKSTYLE AvoidStarImport%0Aimport static org.assertj.core.api.Assertions.*;%0A%0A
 import j
@@ -599,11 +599,856 @@
 st);%0A  %7D
+%0A%0A  @Test%0A  public void testGetCykTableTestOutOfBounds() %7B%0A    ParseTable pt = new ParseTable(Token.tokenize(%22out of bound%22));%0A%0A    // y %3C 0%0A    assertThatExceptionOfType(IndexOutOfBoundsException.class)%0A        .isThrownBy(() -%3E pt.get(1, -1))%0A        .withMessage(%22Position outside the table %5B1, -1%5D%22);%0A%0A    // y %3E size%0A    assertThatExceptionOfType(IndexOutOfBoundsException.class)%0A        .isThrownBy(() -%3E pt.get(1, 42))%0A        .withMessage(%22Position outside the table %5B1, 42%5D%22);%0A%0A    // x %3C 0%0A    assertThatExceptionOfType(IndexOutOfBoundsException.class)%0A        .isThrownBy(() -%3E pt.get(-1, 2))%0A        .withMessage(%22Position outside the table %5B-1, 2%5D%22);%0A%0A    // x %3E y%0A    assertThatExceptionOfType(IndexOutOfBoundsException.class)%0A        .isThrownBy(() -%3E pt.get(42, 2))%0A        .withMessage(%22Position outside the table %5B42, 2%5D%22);%0A  %7D
 %0A%7D%0A

add test for IndexOutOfBoundsException in ParseTable class