package Ġcom . we ed ow . spring . data . search . autoconfigure Ċ Ċ import Ġcom . we ed ow . spring . data . search . alias . Alias Resolver Ċ import Ġcom . we ed ow . spring . data . search . alias . Alias Resolver Registry Ċ import Ġcom . we ed ow . spring . data . search . common . model . Person Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . jupiter . api . Test Ċ Ċ internal Ġclass ĠData Search Default Alias Configurer Auto Configuration Test Ġ{ ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġadd Alias Resolvers () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġregistry Ġ= ĠTest Alias Resolver Registry () ĊĊĠĠĠĠĠĠĠ Ġval Ġdefault Alias Configurer Ġ= ĠData Search Default Alias Configurer Auto Configuration () ĊĠĠĠĠĠĠĠ Ġdefault Alias Configurer . add Alias Resolvers ( registry ) ĊĊĠĠĠĠĠĠĠ ĠassertThat ( registry . alias Resolvers ). has Size ( 1 ) ĊĊĠĠĠĠĠĠĠ Ġval Ġalias Resolver Ġ= Ġregistry . alias Resolvers [ 0 ] ĊĊĠĠĠĠĠĠĠ Ġval Ġentity Class Ġ= ĠPerson :: class . java ĊĊĠĠĠĠĠĠĠ ĠassertThat ( alias Resolver . supports ( entity Class , Ġget Field ( entity Class , Ġ" firstName ")) ). isTrue () ĊĊĠĠĠĠĠĠĠ Ġvar Ġaliases Ġ= Ġalias Resolver . resolve ( entity Class , Ġget Field ( entity Class , Ġ" firstName ")) ĊĠĠĠĠĠĠĠ ĠassertThat ( aliases ). isEmpty () ĊĊĠĠĠĠĠĠĠ Ġaliases Ġ= Ġalias Resolver . resolve ( entity Class , Ġget Field ( entity Class , Ġ" lastName ")) ĊĠĠĠĠĠĠĠ ĠassertThat ( aliases ). isEmpty () ĊĊĠĠĠĠĠĠĠ Ġaliases Ġ= Ġalias Resolver . resolve ( entity Class , Ġget Field ( entity Class , Ġ" address Entities ")) ĊĠĠĠĠĠĠĠ ĠassertThat ( aliases ). contains Exactly (" address ") ĊĊĠĠĠĠĠĠĠ Ġaliases Ġ= Ġalias Resolver . resolve ( entity Class , Ġget Field ( entity Class , Ġ" job Entity ")) ĊĠĠĠĠĠĠĠ ĠassertThat ( aliases ). contains Exactly (" job ") ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġprivate Ġfun Ġget Field ( clazz : ĠClass <* >, ĠfieldName : ĠString ) Ġ= Ġclazz . getDeclared Field ( fieldName ) ĊĊĠĠĠ Ġclass ĠTest Alias Resolver Registry Ġ: ĠAlias Resolver Registry Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġalias Resolvers Ġ= Ġmutable ListOf < Alias Resolver >() ĊĊĠĠĠĠĠĠĠ Ġoverride Ġfun Ġadd Alias Resolver ( alias Resolver : ĠAlias Resolver ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġalias Resolvers . add ( alias Resolver ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }