class GetQueryParameterRule implements IResolveDependencyStrategy {

    @Override
    public <T> T resolve(final Object... args) throws ResolveDependencyStrategyException {
        try {
            URL url = new URL("http:" + ((FullHttpRequest) args[0]).getUri());
            String query = url.getQuery();

            String param = Stream.of(query.split("&"))
                    .map(x -> x.split("="))
                    .filter(x -> x[0].equals(args[1]))
                    .findFirst().get()[1];

            return (T) param;
        } catch (MalformedURLException e) {
            throw new ResolveDependencyStrategyException("Failed to parse url", e);
        }
    }

}