package Ġcom . nic olas gu ill en . k oint lin Ċ Ċ import Ġcom . nic olas gu ill en . k oint lin . services . errors . ApiException Ċ import Ġcom . nic olas gu ill en . k oint lin . services . re ponse s . Error Envelope Ċ import Ġorg . mockito . Mockito Ċ import Ġorg . mockito . stub bing . Stub ber Ċ Ċ fun Ġ< T > ĠStub ber . wh enever ( mock : ĠT ): ĠT Ġ= Ġ` when `( mock ) Ċ Ċ fun Ġ< T > Ġany (): ĠT Ġ{ ĊĠĠĠ ĠMockito . any < T >() ĊĠĠĠ Ġreturn Ġun initialized () Ċ } Ċ @ Suppress (" UN CHECK ED _ CAST ") Ċ private Ġfun Ġ< T > Ġun initialized (): ĠT Ġ= Ġnull Ġas ĠT Ċ Ċ fun Ġapi Error () Ġ= ĠApiException ( Error Envelope ( 5 0 0 , Ġ" BadRequest ", Ġ" Fake Ġerror ! "))