package Ġcom . github . dav in ke vin . podcast server . manager . selector Ċ Ċ import Ġcom . github . dav in ke vin . podcast server . manager . worker . noop . Pass Through Extractor Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . any Ċ import Ġcom . n ha ar man . mock it ok otlin 2 . wh enever Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . BeforeEach Ċ import Ġorg . junit . jupiter . api . DisplayName Ċ import Ġorg . junit . jupiter . api . Test Ċ import Ġorg . junit . jupiter . api . extension . Extend With Ċ import Ġorg . junit . jupiter . params . Parameterized Test Ċ import Ġorg . junit . jupiter . params . provider . Arguments Ċ import Ġorg . junit . jupiter . params . provider . Method Source Ċ import Ġorg . mockito . junit . jupiter . Mockito Settings Ċ import Ġorg . mockito . quality . Strict ness Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . boot . test . mock . mockito . Mock Bean Ċ import Ġorg . springframework . context . ApplicationContext Ċ import Ġorg . springframework . test . context . junit . jupiter . Spring Extension Ċ import Ġjava . net . URI Ċ import Ġjava . util . stream . Stream Ċ import Ġkotlin . reflect . K Class Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġke vin Ġon Ġ 0 3 / 1 2 / 2 0 1 7 Ċ Ġ*/ Ċ @ Extend With ( Spring Extension :: class ) Ċ @ Mockito Settings ( strict ness Ġ= ĠStrict ness . LEN IENT ) Ċ class ĠExtract or Selector Test ( ĊĠĠĠ Ġ@ Autowired Ġval Ġapplication Context : ĠApplication Context Ċ ) Ġ{ ĊĊĠĠĠ Ġ@ Mock Bean Ġprivate Ġlateinit Ġvar Ġpass Through Extractor : ĠPass Through Extractor ĊĊĠĠĠ Ġprivate Ġlateinit Ġvar Ġextractor : ĠExtract or Selector ĊĊĠĠĠ Ġ@ BeforeEach ĊĠĠĠ Ġfun ĠbeforeEach () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġextract ors Ġ= Ġset Of ( pass Through Extractor ) ĊĊĠĠĠĠĠĠĠ Ġextract ors . forEach Ġ{ Ġwhenever ( it . compatibility ( any ())). then Call Real Method () Ġ} ĊĊĠĠĠĠĠĠĠ Ġextractor Ġ= ĠExtract or Selector ( application Context , Ġextract ors ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġ` should Ġreturn Ġno Ġop Ġif Ġempty Ġstring `() Ġ{ ĊĠĠĠĠĠĠĠ Ġ/* ĠWhen Ġ Ġ*/ ĊĠĠĠĠĠĠĠ Ġval Ġextractor Class Ġ= Ġextractor . of ( URI (" https :// foo . bar . com ")) ĊĠĠĠĠĠĠĠ Ġ/* ĠThen Ġ Ġ*/ ĊĠĠĠĠĠĠĠ ĠassertThat ( extractor Class ). isInstanceOf ( Pass Through Extractor :: class . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Method Source (" url To Extractor ") ĊĠĠĠ Ġ@ DisplayName (" should Ġreturn ") ĊĠĠĠ Ġ@ Parameterized Test ( name Ġ= Ġ"{ 1 } Ġfinder Ġfor Ġ{ 0 }") ĊĠĠĠ Ġfun Ġ` should Ġreturn Ġmatching Ġupdater `( url : ĠURI , Ġtype : ĠK Class <* >) Ġ{ ĊĠĠĠĠĠĠĠ Ġ/* ĠWhen Ġ*/ ĊĠĠĠĠĠĠĠ Ġval Ġextractor Class Ġ= Ġextractor . of ( url ) ĊĠĠĠĠĠĠĠ Ġ/* ĠThen Ġ*/ ĊĠĠĠĠĠĠĠ ĠassertThat ( extractor Class ). isInstanceOf ( type . java ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Jvm Static ĊĠĠĠĠĠĠĠ Ġfun Ġurl To Extractor () Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠStream . of ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArguments . of ( URI (" http :// www . be in sport s . com / france / replay / lex press o "), ĠPass Through Extractor :: class ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArguments . of ( URI (" http :// www . d ail ym otion . com / foo / bar "), ĠPass Through Extractor :: class ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArguments . of ( URI (" http :// www . je ux video . com / chron iques - video . htm "), ĠPass Through Extractor :: class ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArguments . of ( URI (" http :// foo . bar . com / to / rss / file . xml "), ĠPass Through Extractor :: class ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠArguments . of ( URI (" http :// www . youtube . com / channel / UC _ io aje fo kj FA OI "), ĠPass Through Extractor :: class ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ Ċ } Ċ