@When("^I configure credential service$") public void setCredentialServiceConfig(List<TestConfig> testConfigs) throws Exception { Map<String, Object> valueMap = new HashMap<>(); KapuaId accId; KapuaId scopeId; Account tmpAccount = (Account) stepData.get("LastAccount"); if (tmpAccount != null) { accId = tmpAccount.getId(); scopeId = tmpAccount.getScopeId(); } else { accId = new KapuaEid(BigInteger.ONE); scopeId = new KapuaEid(BigInteger.ONE); } for (TestConfig config : testConfigs) { config.addConfigToMap(valueMap); } primeException(); try { credentialService.setConfigValues(accId, scopeId, valueMap); } catch (KapuaException ex) { verifyException(ex); } }