@Override
    protected void setProperties(Map<String, String> properties) throws DdlException {
        Preconditions.checkState(properties != null);
        for (String key : properties.keySet()) {
            if (!DRIVER_URL.equals(key) && !URI.equals(key) && !USER.equals(key) && !PASSWORD.equals(key)
                    && !TYPE.equals(key) && !NAME.equals(key) && !DRIVER_CLASS.equals(key)) {
                throw new DdlException("Property " + key + " is unknown");
            }
        }
        configs = properties;

        checkProperties(DRIVER_URL);
        checkProperties(DRIVER_CLASS);
        checkProperties(URI);
        checkProperties(USER);
        checkProperties(PASSWORD);

        computeDriverChecksum();
    }
@Test(expected = DdlException.class)
    public void testWithoutPassword() throws Exception {
        Map<String, String> configs = getMockConfigs();
        configs.remove(JDBCResource.PASSWORD);
        JDBCResource resource = new JDBCResource("jdbc_resource_test");
        resource.setProperties(configs);
    }