List of usage examples for java.rmi RemoteException RemoteException
public RemoteException()
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RuntimeException.class) public void testSearch_RemoteException() throws Exception { when(mockPersonClient.query(any(Person.class), any(LimitOffset.class))).thenThrow(new RemoteException()); service.search("term"); }
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RuntimeException.class) public void testGetByExternalId_RemoteException() throws Exception { when(mockPersonClient.getById(any(Id.class))).thenThrow(new RemoteException()); service.getByExternalId(TEST_NES_ID); }
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RuntimeException.class) public void testSave_Create_Fail() throws Exception { when(mockPersonClient.create(any(Person.class))).thenThrow(new RemoteException()); gov.nih.nci.firebird.data.Person person = PersonFactory.getInstance().createWithoutExternalData(); service.save(person);/*from w ww . j av a2 s. c om*/ }
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RuntimeException.class) public void testSave_Create_RemoteException() throws Exception { when(mockPersonClient.create(any(Person.class))).thenThrow(new RemoteException()); service.save(null);/*from w ww . ja va2 s. c o m*/ }
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RuntimeException.class) public void testSave_Update_Fail() throws Exception { doThrow(new RemoteException()).when(mockPersonClient).update(any(Person.class)); PersonFactory pf = PersonFactory.getInstance(); gov.nih.nci.firebird.data.Person p = pf.create(); service.save(p);/*w ww.j av a 2s . co m*/ }
From source file:gov.nih.nci.firebird.nes.person.NesPersonServiceBeanTest.java
@Test(expected = RemoteServiceException.class) public void testGetCtepId_RemoteException() throws Exception { when(mockIdentifiedPersonClient.query(any(IdentifiedPerson.class), any(LimitOffset.class))) .thenThrow(new RemoteException()); service.getCtepId("1"); }