// ĠCopyright Ġ 2 0 1 8 ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ // ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ċ package Ġsoftware . aws . tool k its . jetbrains . core . explorer Ċ Ċ import Ġcom . intellij . openapi . action System . Default Action Group Ċ import Ġcom . intellij . openapi . action System . Separator Ċ import Ġcom . intellij . test Framework . Project Rule Ċ import Ġorg . assertj . core . api . Assertions . assertThat Ċ import Ġorg . junit . Rule Ċ import Ġorg . junit . Test Ċ import Ġsoftware . aws . tool k its . core . region . Aws Region Ċ import Ġsoftware . aws . tool k its . jetbrains . core . credentials . Mock Project Account Settings Manager Ċ import Ġsoftware . aws . tool k its . jetbrains . core . credentials . Project Account Settings Manager Ċ Ċ class ĠAws Settings Menu Test Ġ{ ĊĊĠĠĠ Ġ@ Jvm Field ĊĠĠĠ Ġ@ Rule ĊĠĠĠ Ġval Ġproject Rule Ġ= ĠProject Rule () ĊĊĠĠĠ Ġprivate Ġval Ġmock Settings Manager Ġby Ġlazy Ġ{ ĠMock Project Account Settings Manager . getInstance ( project Rule . project ) Ġ} ĊĊĠĠĠ Ġ@ Test ĊĠĠĠ Ġfun Ġitems Are Ref reshed When Settings Change () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġsut Ġ= ĠAws Settings Menu ( project Rule . project ) ĊĊĠĠĠĠĠĠĠ Ġmock Settings Manager . internal Recent ly Used Regions . add ( Aws Region . GLOBAL ) ĊĠĠĠĠĠĠĠ Ġproject Rule . project . message Bus . sync Publisher ( Project Account Settings Manager . ACCOUNT _ SETTINGS _ CHANGED ). active Region Changed ( Aws Region . GLOBAL ) ĊĊĠĠĠĠĠĠĠ Ġval Ġaction Group Ġ= Ġsut . getChildren ( null ). first () Ġas ĠDefault Action Group ĊĠĠĠĠĠĠĠ Ġval Ġsepar ators Ġ= Ġaction Group . getChildren ( null ). filter Is Instance < Separator >() ĊĊĠĠĠĠĠĠĠ ĠassertThat ( separ ators ). any Satisf y Ġ{ ĠassertThat ( it . text ). isEqualTo (" Recent ĠReg ions ") Ġ} ĊĠĠĠ Ġ} Ċ }