@Test(expected = ServiceUnavailableException.class) public void findAll_backingStoreException() throws Exception { expect(dao.findAll(RING_NAME)).andThrow(new BackingStoreException()); replayAll(); service.findAll(RING_NAME); }
@Override public ImmutableSet<CassandraInstance> findAll(String ring) { try { return dao.findAll(ring); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } }
CassandraInstanceServiceImpl implements CassandraInstanceService { @Override public ImmutableSet<CassandraInstance> findAll(String ring) { try { return dao.findAll(ring); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } }
CassandraInstanceServiceImpl implements CassandraInstanceService { @Override public ImmutableSet<CassandraInstance> findAll(String ring) { try { return dao.findAll(ring); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraInstanceServiceImpl(CassandraInstanceDao dao); }
CassandraInstanceServiceImpl implements CassandraInstanceService { @Override public ImmutableSet<CassandraInstance> findAll(String ring) { try { return dao.findAll(ring); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraInstanceServiceImpl(CassandraInstanceDao dao); @Override ImmutableSet<CassandraInstance> findAll(String ring); @Override @Nullable CassandraInstance findById(String ring, int id); @Override void save(String ring, CassandraInstance instance); @Override void delete(String ring, CassandraInstance instance); }
CassandraInstanceServiceImpl implements CassandraInstanceService { @Override public ImmutableSet<CassandraInstance> findAll(String ring) { try { return dao.findAll(ring); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraInstanceServiceImpl(CassandraInstanceDao dao); @Override ImmutableSet<CassandraInstance> findAll(String ring); @Override @Nullable CassandraInstance findById(String ring, int id); @Override void save(String ring, CassandraInstance instance); @Override void delete(String ring, CassandraInstance instance);  }