package Ġcom . alibaba . ttl . thread pool . agent . transform let . helper Ċ Ċ import Ġcom . alibaba . support . junit . conditional . Conditional Ignore Rule Ċ import Ġcom . alibaba . support . junit . conditional . Conditional Ignore Rule . Conditional Ignore Ċ import Ġcom . alibaba . support . junit . conditional . Is Agent Run Ċ import Ġcom . alibaba . ttl . thread pool . agent . logging . Logger Ċ import Ġcom . alibaba . ttl . thread pool . agent . transform let . helper . T tl Transform let Helper .* Ċ import Ġjav assist . Class Pool Ċ import Ġorg . apache . commons . lang 3 . StringUtils Ċ import Ġorg . hamcrest . Core Matchers Ċ import Ġorg . hamcrest . Matcher Assert Ċ import Ġorg . junit . Assert .* Ċ import Ġorg . junit . BeforeClass Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ Ċ class ĠT tl Transform let Helper Test Ġ{ ĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġval Ġrule Ġ= ĠConditional Ignore Rule () ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ getFile Location Of Class _ java Class () Ġ{ ĊĊĠĠĠĠĠĠĠ ĠassertNull ( getLocation File Of Class ( String :: class . java )) ĊĊĠĠĠĠĠĠĠ ĠMatcher Assert . assertThat ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget Location File Of Class ( StringUtils :: class . java ), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCore Matchers . endsWith ("/ commons - lang 3 - 3 . 5 . jar ") ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġ@ Conditional Ignore ( condition Ġ= ĠIs Agent Run :: class ) Ġ// Ġskip Ġunit Ġtest Ġfor ĠJ av assist Ġon Ġagent , Ġbecause ĠJ av assist Ġis Ġre package d ĊĠĠĠ Ġfun Ġtest _ getFile Location Of Class _ ct Class () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġclass Pool Ġ= ĠClass Pool ( true ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠJava Ġ 8 : Ġfile :/ path / to / jdk _ 8 / jre / lib / rt . jar !/ java / lang / String . class ĊĠĠĠĠĠĠĠ Ġ// ĠJava Ġ 1 1 : Ġ/ java . base / java / lang / String . class ĊĠĠĠĠĠĠĠ ĠMatcher Assert . assertThat ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget Location File Of Class ( class Pool . getC t Class (" java . lang . String ")), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCore Matchers . endsWith ("/ java / lang / String . class ") ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġ// ĠJava Ġ 8 : Ġfile :/ path / to / commons - lang 3 - 3 . 5 . jar !/ org / apache / commons / lang 3 / StringUtils . class ĊĠĠĠĠĠĠĠ ĠMatcher Assert . assertThat ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget Location File Of Class ( class Pool . getC t Class (" org . apache . commons . lang 3 . StringUtils ")), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠCore Matchers . endsWith ("/ commons - lang 3 - 3 . 5 . jar !/ org / apache / commons / lang 3 / StringUtils . class ") ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġtest _ className _ package () Ġ{ ĊĠĠĠĠĠĠĠ ĠassertEquals ("", Ġget PackageName (" Hello ")) ĊĠĠĠĠĠĠĠ ĠassertEquals (" com . foo ", Ġget PackageName (" com . foo . Hello ")) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( is Class At Package (" java . util . Timer Task ", Ġ" java . util ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class At Package (" java . util . Timer Task ", Ġ" java . utils ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class At Package (" java . util . Timer Task ", Ġ" java ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class At Package (" java . util . Timer Task ", Ġ" java . util . zip ")) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( is Class Under Package (" java . util . Timer Task ", Ġ" java . util ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class Under Package (" java . util . Timer Task ", Ġ" java . utils ")) ĊĠĠĠĠĠĠĠ ĠassertTrue ( is Class Under Package (" java . util . Timer Task ", Ġ" java ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class Under Package (" java . util . Timer Task ", Ġ" javax ")) ĊĊĠĠĠĠĠĠĠ ĠassertTrue ( is Class At Package JavaUtil (" java . util . Priority Queue ")) ĊĠĠĠĠĠĠĠ ĠassertFalse ( is Class At Package JavaUtil (" java . util . zip . Zip InputStream ")) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ BeforeClass ĊĠĠĠĠĠĠĠ Ġ@ Jvm Static ĊĠĠĠĠĠĠĠ Ġ@ Suppress (" unused ") ĊĠĠĠĠĠĠĠ Ġfun Ġbefore Class () Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ ĠLogger . set Logger Impl Type IfNot Set Y et (" stderr ") ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ