@feng-zihao I usually feel the same. But in the case of logger, people in this community and Scala's (companion object is, I believe, influenced by Scala) tend to recommend "logger per instance" style. Also I found myself not using
@BeforeClass
and
@AfterClass
so frequently, though sometimes it may be prohibitively expensive doing the same things in
@Before
and
@After
. AFAIK, there is no simpler syntax for doing what you want in Kotlin.