@Test public void testGetCurrentAccountId() { assertEquals(TEST_ACCOUNT_ID, ThreadBasedUserCrnProvider.doAs(CRN.toString(), () -> crnService.getCurrentAccountId())); }
public String getCurrentAccountId() { String userCrn = ThreadBasedUserCrnProvider.getUserCrn(); if (userCrn == null) { throw new CrnParseException("Current user CRN is not set"); } Crn crn = Crn.safeFromString(userCrn); return crn.getAccountId(); }
CrnService { public String getCurrentAccountId() { String userCrn = ThreadBasedUserCrnProvider.getUserCrn(); if (userCrn == null) { throw new CrnParseException("Current user CRN is not set"); } Crn crn = Crn.safeFromString(userCrn); return crn.getAccountId(); } }
CrnService { public String getCurrentAccountId() { String userCrn = ThreadBasedUserCrnProvider.getUserCrn(); if (userCrn == null) { throw new CrnParseException("Current user CRN is not set"); } Crn crn = Crn.safeFromString(userCrn); return crn.getAccountId(); }  }
CrnService { public String getCurrentAccountId() { String userCrn = ThreadBasedUserCrnProvider.getUserCrn(); if (userCrn == null) { throw new CrnParseException("Current user CRN is not set"); } Crn crn = Crn.safeFromString(userCrn); return crn.getAccountId(); }  String getCurrentAccountId(); String getCurrentUserId(); Crn createCrn(DatabaseConfig resource); Crn createCrn(DatabaseServerConfig resource); Crn createCrn(DBStack resource); }
CrnService { public String getCurrentAccountId() { String userCrn = ThreadBasedUserCrnProvider.getUserCrn(); if (userCrn == null) { throw new CrnParseException("Current user CRN is not set"); } Crn crn = Crn.safeFromString(userCrn); return crn.getAccountId(); }  String getCurrentAccountId(); String getCurrentUserId(); Crn createCrn(DatabaseConfig resource); Crn createCrn(DatabaseServerConfig resource); Crn createCrn(DBStack resource);  }