package com.grayben.riskExtractor.htmlScorer.scorers.elementScorers;

import com.grayben.riskExtractor.htmlScorer.scorers.Scorer;
import com.grayben.riskExtractor.htmlScorer.scorers.ScorerTest;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
import org.junit.After;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

/**
 * Created by beng on 28/11/2015.
 */
@RunWith(MockitoJUnitRunner.class)
public class SegmentationElementScorerTest
        extends ScorerTest<Element> {

    SegmentationElementScorer elementScorerSUT;
    @Mock
    Scorer<Tag> tagScorerMock;
    @Mock
    Element elementMock;

    @Before
    public void setUp() throws Exception {
        elementScorerSUT = new SegmentationElementScorer(tagScorerMock);
        super.setUp(elementScorerSUT);
    }

    @After
    public void tearDown() throws Exception {
        elementScorerSUT = null;
    }

}
package com.grayben.riskExtractor.htmlScorer.scorers.elementScorers;

import com.grayben.riskExtractor.htmlScorer.scorers.Scorer;
import com.grayben.riskExtractor.htmlScorer.scorers.ScorerTest;
import org.jsoup.nodes.Element;
import org.jsoup.parser.Tag;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

/**
 * Created by beng on 28/11/2015.
 */
@RunWith(MockitoJUnitRunner.class)
public class SegmentationElementScorerTest
        implements ScorerTest {

    SegmentationElementScorer elementScorerSUT;
    @Mock
    Scorer<Tag> tagScorerMock;
    @Mock
    Element elementMock;

    @Rule
    ExpectedException thrown = ExpectedException.none();

    @Before
    public void setUp() throws Exception {
        elementScorerSUT = new SegmentationElementScorer(tagScorerMock);
    }

    @After
    public void tearDown() throws Exception {
        elementScorerSUT = null;
    }

}
--- 
+++ 
@@ -6,8 +6,6 @@
 import org.jsoup.parser.Tag;
 import org.junit.After;
 import org.junit.Before;
-import org.junit.Rule;
-import org.junit.rules.ExpectedException;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
@@ -17,7 +15,7 @@
  */
 @RunWith(MockitoJUnitRunner.class)
 public class SegmentationElementScorerTest
-        implements ScorerTest {
+        extends ScorerTest<Element> {
 
     SegmentationElementScorer elementScorerSUT;
     @Mock
@@ -25,12 +23,10 @@
     @Mock
     Element elementMock;
 
-    @Rule
-    ExpectedException thrown = ExpectedException.none();
-
     @Before
     public void setUp() throws Exception {
         elementScorerSUT = new SegmentationElementScorer(tagScorerMock);
+        super.setUp(elementScorerSUT);
     }
 
     @After
Align test with new base class
