@Test(expected = ServiceUnavailableException.class) public void findAll_backingStoreException() throws Exception { expect(dao.findAll()).andThrow(new BackingStoreException()); replayAll(); service.findAll(); }
@Override public ImmutableSet<CassandraRing> findAll() { try { return dao.findAll(); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } }
CassandraRingServiceImpl implements CassandraRingService { @Override public ImmutableSet<CassandraRing> findAll() { try { return dao.findAll(); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } }
CassandraRingServiceImpl implements CassandraRingService { @Override public ImmutableSet<CassandraRing> findAll() { try { return dao.findAll(); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraRingServiceImpl(CassandraRingDao dao); }
CassandraRingServiceImpl implements CassandraRingService { @Override public ImmutableSet<CassandraRing> findAll() { try { return dao.findAll(); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraRingServiceImpl(CassandraRingDao dao); @Override ImmutableSet<CassandraRing> findAll(); @Override CassandraRing findByName(String name); @Override void save(CassandraRing ring); @Override void delete(CassandraRing ring); }
CassandraRingServiceImpl implements CassandraRingService { @Override public ImmutableSet<CassandraRing> findAll() { try { return dao.findAll(); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraRingServiceImpl(CassandraRingDao dao); @Override ImmutableSet<CassandraRing> findAll(); @Override CassandraRing findByName(String name); @Override void save(CassandraRing ring); @Override void delete(CassandraRing ring);  }