@Test
public void violationRuleSeverityContainsThePriorityFromTheReport() throws XMLStreamException {
final org.sonar.api.resources.File dummyFile = new org.sonar.api.resources.File("test");
givenAProject().containingSourceDirectory("dummy");
final SensorContext context = mock(SensorContext.class);
final List<Violation> parseResults = new ArrayList<Violation>();
final StaxParser parser = new StaxParser(new OCLintXMLStreamHandler(parseResults, project(), context));
when(context.getResource(any(Resource.class))).thenReturn(dummyFile);
parser.parse(new StringInputStream(VALID_REPORT));
assertEquals(RulePriority.MAJOR, parseResults.get(0).getRule().getSeverity());
}