@Test public void createCatchesUnauthorizedException() throws ComponentLookupException { when(this.repo.create()).thenThrow(new SecurityException("Unauthorized")); Assert.assertNull(this.mocker.getComponentUnderTest().create()); }
public Patient create() { try { return this.internalService.create(); } catch (SecurityException ex) { return null; } }
PatientDataScriptService implements ScriptService { public Patient create() { try { return this.internalService.create(); } catch (SecurityException ex) { return null; } } }
PatientDataScriptService implements ScriptService { public Patient create() { try { return this.internalService.create(); } catch (SecurityException ex) { return null; } }  }
PatientDataScriptService implements ScriptService { public Patient create() { try { return this.internalService.create(); } catch (SecurityException ex) { return null; } }  Patient get(DocumentReference reference); Patient get(String id); @Deprecated Patient getPatientById(String id); Patient getByName(String name); Patient getPatientByExternalId(String externalId); Iterator<Patient> getAll(); @Deprecated Patient createNewPatient(); Patient create(); boolean delete(Patient patient); }
PatientDataScriptService implements ScriptService { public Patient create() { try { return this.internalService.create(); } catch (SecurityException ex) { return null; } }  Patient get(DocumentReference reference); Patient get(String id); @Deprecated Patient getPatientById(String id); Patient getByName(String name); Patient getPatientByExternalId(String externalId); Iterator<Patient> getAll(); @Deprecated Patient createNewPatient(); Patient create(); boolean delete(Patient patient);  }