diff --git a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt index 0715870403..f44b0cd437 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt +++ b/core-kotlin/src/test/kotlin/com/baeldung/random/RandomStringTest.kt @@ -16,11 +16,10 @@ class RandomStringTest { val charPool = ArrayList() - @BeforeEach - fun charPool() { - charPool.addAll('a'..'z'); - charPool.addAll('A'..'Z'); - charPool.addAll('0'..'9'); + init { + charPool.addAll('a'..'z') + charPool.addAll('A'..'Z') + charPool.addAll('0'..'9') } @Test