@Override
    public int getRemainDays() throws ServiceException {
        try {
            UriBuilder builder = UriBuilder.fromPath(
                    baseResourceUri + REMAIN_DAYS_PATH);
            URI uri = builder.build();
            GetMethod getMethod = requestGetMethodFactory
                    .newPlainTextRequestMethod(uri);
            String daysStr = null;
            try {
                httpClient.executeMethod(getMethod);
                int status = getMethod.getStatusCode();
                if (status != 200) {
                    throw new UnexpectedStatusException(status);
                }
                daysStr = getMethod.getResponseBodyAsString();
                return Integer.parseInt(daysStr);
            } catch (NumberFormatException ex) {
                throw new ServiceException(String.format(
                        "NumberFormatException occurred " +
                                "during parsing [ %s ] with uri [ %s ]",
                        daysStr, getMethod.getURI().toString()), ex);
            } finally {
                getMethod.releaseConnection();
            }
        } catch (Exception ex) {
            throw new ServiceException(ex);
        }
    }