XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • None
    • None
    • None

    Description

      Hi, 

      I have generated tests for "Opennlp tools" classes using Evosuite (version 1.0.6)framework but when I run generated tests I have this failure (full trace):

      <testcase name*="test04" ** classname="opennlp.tools.formats.brat.AnnotationConfiguration_ESTest" ** time="0.012">*

          <failure message*="Exception was not thrown in org.evosuite.runtime.mock.java.io.MockFileInputStream but in java.io.FilePermission.init(FilePermission.java:191): java.lang.NullPointerException: name can't be null" ** type="java.lang.AssertionError"><![CDATA[*java.lang.AssertionError: Exception was not thrown in org.evosuite.runtime.mock.java.io.MockFileInputStream but in java.io.FilePermission.init(FilePermission.java:191): java.lang.NullPointerException: name can't be null

      at org.evosuite.runtime.EvoAssertions.assertThrownBy(EvoAssertions.java:112)

      at org.evosuite.runtime.EvoAssertions.verifyException(EvoAssertions.java:49)

      at opennlp.tools.formats.brat.AnnotationConfiguration_ESTest.test04(AnnotationConfiguration_ESTest.java:91)

      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

      at java.lang.reflect.Method.invoke(Method.java:498)

      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)

      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)

      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)

      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)

      at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)

      at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)

      at java.util.concurrent.FutureTask.run(FutureTask.java:266)

      at java.lang.Thread.run(Thread.java:748)

      ]]></failure>

       

      And this is the generated test:

      @Test(timeout = 4000)
      public void test04() throws Throwable {

      try

      { AnnotationConfiguration.parse((File) null); fail("Expecting exception: NullPointerException"); }

      catch(NullPointerException e)

      { // // no message in exception (getMessage() returned null) // verifyException("org.evosuite.runtime.mock.java.io.MockFileInputStream", e); }

      }

       

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            Pourang Soodeh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: