package com.grayben.riskExtractor.headingMarker.nominator;

import com.grayben.riskExtractor.headingMarker.UnmodifiableText;
import com.grayben.riskExtractor.headingMarker.UnmodifiableTextTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;

/**
 * Created by beng on 28/11/2015.
 */
@RunWith(MockitoJUnitRunner.class)
public class NominatedTextTest
    extends UnmodifiableTextTest
        implements
        INomineesRetrievableTest {

    NominatedText nominatedTextSUT = null;

    @Mock
    protected List<Integer> nomineesMock = null;

    @Before
    public void setUpNominatedText() throws Exception {
        assertNotNull (stringListArgument);
        this.nominatedTextSUT = new NominatedText(stringListArgument, nomineesMock);
        super.unmodifiableTextSUT = this.nominatedTextSUT;
    }

    @After
    public void tearDownNominatedText() throws Exception {
        nominatedTextSUT = null;
    }

    @Override
    @Test
    public void test_GetNominees_ReturnsNonNull_Always() throws Exception {
        //setup data

        //setup expectations

        //execute
        List<Integer> nomineesReturned = nominatedTextSUT.getNominees();

        //validate
        assertNotNull(nomineesReturned);
    }
}
@@ -994,52 +994,8 @@
 n %7B%0A
-        assertNotNull (stringListArgument);%0A
     
@@ -1260,16 +1260,291 @@
    @
-Override
+Test%0A    public void%0A    test_BasicConstructorThrowsNullPointerException_WhenStringListIsNull%0A            () throws Exception %7B%0A        stringListArgument = null;%0A%0A        thrown.expect(NullPointerException.class);%0A%0A        new NominatedText(stringListArgument, nomineesMock);%0A    %7D%0A
 %0A   
@@ -1569,270 +1569,1665 @@
 void
+%0A   
  test_
-GetNominees_ReturnsNonNull_Always() throws Exception %7B%0A        //setup data%0A%0A        //setup expectations%0A%0A        //execute%0A        List%3CInteger%3E nomineesReturned = nominatedTextSUT.getNominees();%0A%0A        //validate%0A        assertNotNull(nomineesReturned
+BasicConstructorThrowsNullPointerException_WhenNomineesIsNull%0A            () throws Exception %7B%0A        nomineesMock = null;%0A%0A        thrown.expect(NullPointerException.class);%0A%0A        new NominatedText(stringListArgument, nomineesMock);%0A    %7D%0A%0A    @Test%0A    public void%0A    test_IncrementalConstructorThrowsNullPointerException_WhenUnmodifiableTextIsNull%0A            () throws Exception %7B%0A        unmodifiableTextSUT = null;%0A%0A        thrown.expect(NullPointerException.class);%0A%0A        new NominatedText(unmodifiableTextSUT, nomineesMock);%0A    %7D%0A%0A    @Test%0A    public void%0A    test_IncrementalConstructorThrowsNullPointerException_WhenNomineesIsNull%0A            () throws Exception %7B%0A        nomineesMock = null;%0A%0A        thrown.expect(NullPointerException.class);%0A%0A        new NominatedText(unmodifiableTextSUT, nomineesMock);%0A    %7D%0A%0A    @Test%0A    public void%0A    test_PrototypeConstructorThrowsNullPointerException_WhenUnmodifiableTextIsNull%0A            () throws Exception %7B%0A        nominatedTextSUT = null;%0A%0A        thrown.expect(NullPointerException.class);%0A%0A        new NominatedText(nominatedTextSUT);%0A    %7D%0A%0A%0A%0A    @Test%0A    public void%0A    test_GetNominees_ReturnsNonNull_Always%0A            () throws Exception %7B%0A%0A        List%3CInteger%3E nomineesReturned = nominatedTextSUT.getNominees();%0A%0A        assertNotNull(nomineesReturned);%0A    %7D%0A%0A    @Test%0A    public void%0A    test_ModifyingReturnedNomineesThrowsUnsupportedOperationException%0A            () throws Exception %7B%0A        List%3CInteger%3E returnedIntegerList = nominatedTextSUT.getNominees();%0A%0A        thrown.expect(UnsupportedOperationException.class);%0A%0A        returnedIntegerList.add(1
 );%0A 

Write tests