You'd get the following error if you use Robolectric for unit testing. The current workaround is to catch IllegalStateException.
java.lang.IllegalStateException: Already initialized
at com.yariksoffice.lingver.Lingver$Companion.init(Lingver.kt:192)
at com.yariksoffice.lingver.Lingver$Companion.init(Lingver.kt:182)
at com.yariksoffice.lingver.Lingver.init(Lingver.kt)
This happens because Robolectric calls Application#onCreate() on each test.
You'd get the following error if you use Robolectric for unit testing. The current workaround is to catch
IllegalStateException
.This happens because Robolectric calls
Application#onCreate()
on each test.