request.setSearchTerm("abc");
request.setWantedFields(wantedFields);
- PDBRestResponse response = new PDBRestClient().executeRequest(request);
+ PDBRestResponse response;
+ try
+ {
+ response = new PDBRestClient().executeRequest(request);
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ fail("Couldn't execute webservice call!");
+ return;
+ }
assertTrue(response.getNumberOfItemsFound() > 99);
assertTrue(response.getSearchSummary() != null);
assertTrue(response.getSearchSummary().size() > 99);
assertEquals(expectedErrorMsg, parsedErrorResponse);
}
- @Test(expected = RuntimeException.class)
- public void testForExpectedRuntimeException()
+ @Test(expected = Exception.class)
+ public void testForExpectedRuntimeException() throws Exception
{
List<PDBDocField> wantedFields = new ArrayList<PDBDocField>();
wantedFields.add(PDBDocField.PDB_ID);