ChainStorage implements IChainStorage { @Override public IReceiverChain resolve(final Object chainId) throws ChainNotFoundException { return resolveState(chainId).getCurrent(); } ChainStorage(final Map<Object, IChainState> chainStates, final IRouter router); @Override void register(final Object chainId, final IObject description); @Override IReceiverChain resolve(final Object chainId); @Override List<Object> enumerate(); @Override Object update(final Object chainId, final IObject modification); @Override void rollback(final Object chainId, final Object modId);  }
@Test(expected = ChainNotFoundException.class) public void Should_throw_When_chainIsNotFound() throws Exception { Map mapMock = mock(Map.class); IRouter routerMock = mock(IRouter.class); IChainStorage storage = new ChainStorage(mapMock, routerMock); storage.resolve(mock(Object.class)); }