### Question:
CrnService { public Crn createCrn(DatabaseConfig resource) { return createCrn(resource, Crn.ResourceType.DATABASE); }  String getCurrentAccountId(); String getCurrentUserId(); Crn createCrn(DatabaseConfig resource); Crn createCrn(DatabaseServerConfig resource); Crn createCrn(DBStack resource);  }### Answer:
@Test public void testCreateCrnDatabaseConfig() { DatabaseConfig resource = new DatabaseConfig(); Crn crn = ThreadBasedUserCrnProvider.doAs(CRN.toString(), () -> crnService.createCrn(resource)); assertEquals(Crn.Service.REDBEAMS, crn.getService()); assertEquals(CRN.getAccountId(), crn.getAccountId()); assertEquals(Crn.ResourceType.DATABASE, crn.getResourceType()); assertEquals("uuid", crn.getResource()); }
@Test public void testCreateCrnDatabaseServerConfig() { DatabaseServerConfig resource = new DatabaseServerConfig(); Crn crn = ThreadBasedUserCrnProvider.doAs(CRN.toString(), () -> crnService.createCrn(resource)); assertEquals(Crn.Service.REDBEAMS, crn.getService()); assertEquals(CRN.getAccountId(), crn.getAccountId()); assertEquals(Crn.ResourceType.DATABASE_SERVER, crn.getResourceType()); assertEquals("uuid", crn.getResource()); }