private void assertExpected( String actionCode, ReportEntry expected )
throws IOException, ReporterException
{
clientReceiveContent();
assertEquals( actionCode, getFirstEvent() );
final ReportEntry firstData = getFirstData();
assertEquals( expected.getSourceName(), firstData.getSourceName() );
assertEquals( expected.getName(), firstData.getName() );
//noinspection deprecation
assertEquals( expected.getElapsed(), firstData.getElapsed() );
assertEquals( expected.getGroup(), firstData.getGroup() );
if ( expected.getStackTraceWriter() != null )
{
//noinspection ThrowableResultOfMethodCallIgnored
assertEquals( expected.getStackTraceWriter().getThrowable().getLocalizedMessage(),
firstData.getStackTraceWriter().getThrowable().getLocalizedMessage() );
assertEquals( expected.getStackTraceWriter().writeTraceToString(),
firstData.getStackTraceWriter().writeTraceToString() );
}
}