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