package Ġio . quart ic . catalog ue Ċ Ċ import Ġcom . opent able . db . postgres . junit . Embedded Postgres Rules Ċ import Ġio . drop wizard . testing . Config Override . config Ċ import Ġio . drop wizard . testing . Resource Helpers . resource FilePath Ċ import Ġio . drop wizard . testing . junit . Drop wizard App Rule Ċ import Ġio . quart ic . catalog ue . api . Catalog ue Client Ċ import Ġio . quart ic . catalog ue . api . model . Dataset Config Ċ import Ġio . quart ic . catalog ue . api . model . Dataset Locator Ċ import Ġio . quart ic . catalog ue . api . model . Dataset Metadata Ċ import Ġio . quart ic . catalog ue . api . model . Dataset Namespace Ċ import Ġio . quart ic . common . client . Client Builder Ċ import Ġorg . hamcrest . Matchers . equalTo Ċ import Ġorg . junit . Assert . assertThat Ċ import Ġorg . junit . Class Rule Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġjava . util . Collections . empty Map Ċ Ċ class ĠCatalog ue Application Should Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġretrieve _ registered _ datasets () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcatalog ue Ġ= ĠClient Builder ( this ). ret rofit < Catalog ue Client >(" http :// localhost :" Ġ+ ĠRULE . local Port Ġ+ Ġ"/ api ") ĊĊĠĠĠĠĠĠĠ Ġval Ġconfig Ġ= ĠDataset Config ( ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠDataset Metadata (" Foo ", Ġ" Bar ", Ġ" Ar lo ", Ġnull ), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠDataset Locator . Postgres Dataset Locator (" a ", Ġ" b ", Ġ" c ", Ġ" d "), ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġempty Map () ĊĠĠĠĠĠĠĠ Ġ) ĊĊĠĠĠĠĠĠĠ Ġval Ġcoords Ġ= Ġcatalog ue . register Dataset Async ( Dataset Namespace (" ye ah "), Ġconfig ). get () ĊĠĠĠĠĠĠĠ Ġval Ġdatasets Ġ= Ġcatalog ue . getData sets Async (). get () ĊĊĠĠĠĠĠĠĠ ĠassertThat ( with Timestamp Removed ( datasets [ coords . namespace ] ! ![ coords . id ] !! ), ĠequalTo ( config )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġwith Timestamp Removed ( actual : ĠDataset Config ) Ġ= Ġactual . copy ( metadata Ġ= Ġactual . metadata . copy ( registered Ġ= Ġnull )) ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġ@ Class Rule ĊĠĠĠĠĠĠĠ Ġ@ Jvm Field ĊĠĠĠĠĠĠĠ Ġval ĠPG Ġ= ĠEmbedded Postgres Rules . single Instance () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġval ĠRULE Ġ= ĠDrop wizard App Rule ( ĊĠĠĠĠĠĠĠ ĠCatalog ue Application :: class . java , ĊĠĠĠĠĠĠĠ Ġresource FilePath (" catalog ue . yml "), ĊĠĠĠĠĠĠĠ Ġconfig (" database . port ", Ġ{ ĠPG . embedded Postgres . port . toString () Ġ}), ĊĠĠĠĠĠĠĠ Ġconfig (" database . database _ name ", Ġ" postgres ") ĊĠĠĠ Ġ) Ċ } Ċ