// ĠCopyright Ġ 2 0 2 0 ĠAmazon . com , ĠInc . Ġor Ġits Ġaffiliates . ĠAll ĠRights ĠReserved . Ċ // ĠSPDX - License - Identifier : ĠApache - 2 . 0 Ċ Ċ package Ġsoftware . aws . tool k its . jetbrains . core Ċ Ċ import Ġcom . intellij . openapi . project . Project Ċ import Ġorg . mockito . kotlin . mock Ċ import Ġsoftware . amazon . aw ssdk . services . s 3 . model . Bucket Ċ import Ġsoftware . aws . tool k its . core . region . Aws Region Ċ import Ġsoftware . aws . tool k its . jetbrains . services . ecs . resources . E cs Resources Ċ import Ġsoftware . aws . tool k its . jetbrains . services . s 3 . resources . S 3 Resources Ċ Ċ fun ĠMock Resource Cache Rule . fill Resource Cache ( project : ĠProject ) Ġ{ ĊĠĠĠ Ġthis . add Entry ( ĊĠĠĠĠĠĠĠ Ġproject , ĊĠĠĠĠĠĠĠ ĠE cs Resources . LIST _ CLUSTER _ AR NS , ĊĠĠĠĠĠĠĠ ĠlistOf (" arn 2 ", Ġ" arn 3 ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġthis . add Entry ( ĊĠĠĠĠĠĠĠ Ġproject , ĊĠĠĠĠĠĠĠ ĠS 3 Resources . LIST _ REGION AL IZED _ BUCKET S , ĊĠĠĠĠĠĠĠ ĠlistOf ( S 3 Resources . Region al ized Bucket ( Bucket . builder (). name (" abc "). build (), ĠAws Region . GLOBAL )) ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġthis . add Entry ( ĊĠĠĠĠĠĠĠ Ġproject , ĊĠĠĠĠĠĠĠ Ġmake Mock List (" arn 2 "), ĊĠĠĠĠĠĠĠ ĠlistOf (" service 1 ", Ġ" service 2 ") ĊĠĠĠ Ġ) ĊĊĠĠĠ Ġthis . add Entry ( ĊĠĠĠĠĠĠĠ Ġproject , ĊĠĠĠĠĠĠĠ Ġmake Mock List (" arn 3 "), ĊĠĠĠĠĠĠĠ ĠlistOf (" service 1 ", Ġ" service 2 ") ĊĠĠĠ Ġ) Ċ } Ċ Ċ fun Ġmake Mock List ( cluster Arn : ĠString ): ĠResource . Cached < List < String >> Ġ= Ġmock Ġ{ ĊĠĠĠ Ġon Ġ{ Ġid Ġ}. thenReturn (" ecs . list _ services .$ cluster Arn ") Ċ } Ċ