@Test(expected = ServiceUnavailableException.class) public void findByName_backingStoreException() throws Exception { expect(dao.findByName(RING_NAME)).andThrow(new BackingStoreException()); replayAll(); service.findByName(RING_NAME); }
@Override public CassandraRing findByName(String name) { try { return dao.findByName(name); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } }
CassandraRingServiceImpl implements CassandraRingService { @Override public CassandraRing findByName(String name) { try { return dao.findByName(name); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } }
CassandraRingServiceImpl implements CassandraRingService { @Override public CassandraRing findByName(String name) { try { return dao.findByName(name); } catch (BackingStoreException e) { throw new ServiceUnavailableException(e); } } @Inject  CassandraRingServiceImpl(CassandraRingDao dao); }
CassandraRingServiceImpl implements CassandraRingService { @Override public CassandraRing findByName(String name) { try { return dao.findByName(name); } 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 CassandraRing findByName(String name) { try { return dao.findByName(name); } 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);  }