io.github.benas.randombeans.api.ObjectGenerationException: Unable to generate a random instance of type class TestObject

GitHub | mikemaaaa | 4 months ago
  1. 0

    Abstract enums are not initialized

    GitHub | 4 months ago | mikemaaaa
    io.github.benas.randombeans.api.ObjectGenerationException: Unable to generate a random instance of type class TestObject

    Root Cause Analysis

    1. io.github.benas.randombeans.api.ObjectGenerationException

      Unable to find a matching concrete subtype of type: class TestEnum

      at io.github.benas.randombeans.FieldPopulator.generateRandomValue()
    2. io.github.benas
      EnhancedRandomImpl.nextObject
      1. io.github.benas.randombeans.FieldPopulator.generateRandomValue(FieldPopulator.java:100)
      2. io.github.benas.randombeans.FieldPopulator.populateField(FieldPopulator.java:79)
      3. io.github.benas.randombeans.EnhancedRandomImpl.populateField(EnhancedRandomImpl.java:153)
      4. io.github.benas.randombeans.EnhancedRandomImpl.populateFields(EnhancedRandomImpl.java:144)
      5. io.github.benas.randombeans.EnhancedRandomImpl.doPopulateBean(EnhancedRandomImpl.java:118)
      6. io.github.benas.randombeans.EnhancedRandomImpl.nextObject(EnhancedRandomImpl.java:72)
      6 frames
    3. Unknown
      GenericCloneTestSingle.testTestEnum
      1. GenericCloneTestSingle.testTestEnum(GenericCloneTestSingle.java:79)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    5. JUnit
      InvokeMethod.evaluate
      1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      4 frames
    6. IntelliJ junit4 module
      JUnit4TestRunnerUtil$IgnoreIgnoredTestJUnit4ClassRunner.runChild
      1. com.intellij.junit4.JUnit4TestRunnerUtil$IgnoreIgnoredTestJUnit4ClassRunner.runChild(JUnit4TestRunnerUtil.java:365)
      1 frame
    7. JUnit
      JUnitCore.run
      1. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      2. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      3. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      4. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      5. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      6. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      7. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      8. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      9. org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      9 frames
    8. IntelliJ junit4 module
      JUnit4IdeaTestRunner.startRunnerWithArgs
      1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
      2. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
      2 frames
    9. IDEA
      JUnitStarter.main
      1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:253)
      2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
      2 frames