diff --git a/test-suite-kotlin/src/test/kotlin/io/micronaut/core/beans/KotlinBeanIntrospectionSpec.kt b/test-suite-kotlin/src/test/kotlin/io/micronaut/core/beans/KotlinBeanIntrospectionSpec.kt index b0fa32cf0a..779c476170 100644 --- a/test-suite-kotlin/src/test/kotlin/io/micronaut/core/beans/KotlinBeanIntrospectionSpec.kt +++ b/test-suite-kotlin/src/test/kotlin/io/micronaut/core/beans/KotlinBeanIntrospectionSpec.kt @@ -1,9 +1,7 @@ package io.micronaut.core.beans import org.junit.jupiter.api.Assertions.assertEquals -import org.junit.jupiter.api.Assertions.assertThrows import org.junit.jupiter.api.Test -import io.micronaut.core.reflect.exception.InstantiationException class KotlinBeanIntrospectionSpec { @@ -11,19 +9,16 @@ class KotlinBeanIntrospectionSpec { fun testWithValueOnKotlinDataClassWithDefaultValues() { val introspection = BeanIntrospection.getIntrospection(SomeEntity::class.java) - assertThrows(InstantiationException::class.java) { - val instance = introspection.instantiate(10L, "foo") + val instance = introspection.instantiate(10L, "foo") - assertEquals(10, instance.id) - assertEquals("foo", instance.something) + assertEquals(10, instance.id) + assertEquals("foo", instance.something) - val changed = introspection.getRequiredProperty("something", String::class.java) - .withValue(instance, "changed") - - assertEquals(10, changed.id) - assertEquals("changed", changed.something) - } + val changed = introspection.getRequiredProperty("something", String::class.java) + .withValue(instance, "changed") + assertEquals(10, changed.id) + assertEquals("changed", changed.something) } @Test