// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/InsufficientDataException.java
// public class InsufficientDataException
//     extends RuntimeException
// {
//     private static final long serialVersionUID = -3081535421752493402L;
// 
//     public InsufficientDataException()
//     {
//         super();
//     }
// 
//     public InsufficientDataException(final String message, final Throwable cause)
//     {
//         super(message, cause);
//     }
// 
//     public InsufficientDataException(final String message)
//     {
//         super(message);
//     }
// 
//     public InsufficientDataException(final Throwable cause)
//     {
//         super(cause);
//     }
// }


import junit.framework.TestCase;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import java.util.Iterator;
import org.dkpro.statistics.agreement.InsufficientDataException;
    public void testCategorySpecificAgreement() {
        ICodingAnnotationStudy study = createExample();

        new ContingencyMatrixPrinter().print(System.out, study);
        new CoincidenceMatrixPrinter().print(System.out, study);

        PercentageAgreement pa = new PercentageAgreement(study);
        assertEquals(4 / 7, pa.calculateCategoryAgreement("low"));
        assertEquals(10 / 13, pa.calculateCategoryAgreement("high"));
    }*/

    public void testMissingCategories()
    {
        // Annotation categories not used by any rater must be added to
        // the study explicitly in order to avoid an InsufficientDataException.
        CodingAnnotationStudy study = new CodingAnnotationStudy(2);
        study.addCategory("A");
        study.addCategory("B");
        study.addItem("A", "A");
        study.addItem("A", "A");
        study.addItem("A", "A");

        PercentageAgreement pa = new PercentageAgreement(study);
        assertEquals(1.0, pa.calculateAgreement());

        BennettSAgreement s = new BennettSAgreement(study);
        assertEquals(1.0, s.calculateObservedAgreement(), 0.001);
        assertEquals(0.5, s.calculateExpectedAgreement(), 0.001);
        assertEquals(1.0, s.calculateAgreement(), 0.001);

// Path: dkpro-statistics-agreement/src/main/java/org/dkpro/statistics/agreement/InsufficientDataException.java
// public class InsufficientDataException
//     extends RuntimeException
// {
//     private static final long serialVersionUID = -3081535421752493402L;
// 
//     public InsufficientDataException()
//     {
//         super();
//     }
// 
//     public InsufficientDataException(final String message, final Throwable cause)
//     {
//         super(message, cause);
//     }
// 
//     public InsufficientDataException(final String message)
//     {
//         super(message);
//     }
// 
//     public InsufficientDataException(final Throwable cause)
//     {
//         super(cause);
//     }
// }


// Path: dkpro-statistics-agreement/src/test/java/org/dkpro/statistics/agreement/coding/TwoRaterAgreementTest.java
import junit.framework.TestCase;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import java.util.Iterator;
import org.dkpro.statistics.agreement.InsufficientDataException;

    public void testCategorySpecificAgreement() {
        ICodingAnnotationStudy study = createExample();

        new ContingencyMatrixPrinter().print(System.out, study);
        new CoincidenceMatrixPrinter().print(System.out, study);

        PercentageAgreement pa = new PercentageAgreement(study);
        assertEquals(4 / 7, pa.calculateCategoryAgreement("low"));
        assertEquals(10 / 13, pa.calculateCategoryAgreement("high"));
    }*/

    public void testMissingCategories()
    {
        // Annotation categories not used by any rater must be added to
        // the study explicitly in order to avoid an InsufficientDataException.
        CodingAnnotationStudy study = new CodingAnnotationStudy(2);
        study.addCategory("A");
        study.addCategory("B");
        study.addItem("A", "A");
        study.addItem("A", "A");
        study.addItem("A", "A");

        PercentageAgreement pa = new PercentageAgreement(study);
        assertEquals(1.0, pa.calculateAgreement());

        BennettSAgreement s = new BennettSAgreement(study);
        assertEquals(1.0, s.calculateObservedAgreement(), 0.001);
        assertEquals(0.5, s.calculateExpectedAgreement(), 0.001);
        assertEquals(1.0, s.calculateAgreement(), 0.001);

        assertThatExceptionOfType(InsufficientDataException.class)