class MapRouter implements IRouter {

    @Override
    public IMessageReceiver route(final Object targetId) throws RouteNotFoundException {
        IMessageReceiver receiver = map.get(targetId);

        if (null == receiver) {
            throw new RouteNotFoundException(MessageFormat.format("Route to {0} not found.", targetId));
        }

        return receiver;
    }

    public  MapRouter(final Map<Object, IMessageReceiver> map);

}