@Test void setProperties() throws Exception { doAnswer(invocation -> { Map<String, Object> map = (Map<String, Object>) invocation.getArguments()[0]; assertEquals(2, map.size()); assertEquals("firstname",map.get("first_name")); assertEquals("lastname", map.get("last_name")); return null; }).when(this.configurationSource).setProperties(any(Map.class)); Map<String, Object> map = new HashMap<>(); map.put("first_name", "firstname"); map.put("last_name", "lastname"); this.user.setProperties(map); }
@Override public void setProperties(Map<String, Object> properties) throws ConfigurationSaveException { getConfigurationSource().setProperties(properties); }
DefaultUserProperties implements UserProperties { @Override public void setProperties(Map<String, Object> properties) throws ConfigurationSaveException { getConfigurationSource().setProperties(properties); } }
DefaultUserProperties implements UserProperties { @Override public void setProperties(Map<String, Object> properties) throws ConfigurationSaveException { getConfigurationSource().setProperties(properties); } DefaultUserProperties(ConfigurationSource configurationSource); }
DefaultUserProperties implements UserProperties { @Override public void setProperties(Map<String, Object> properties) throws ConfigurationSaveException { getConfigurationSource().setProperties(properties); } DefaultUserProperties(ConfigurationSource configurationSource); @Override boolean displayHiddenDocuments(); @Override void setDisplayHiddenDocuments(boolean displayHiddenDocuments); @Override boolean isActive(); @Override void setActive(boolean isActive); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override InternetAddress getEmail(); @Override void setEmail(InternetAddress emailAddress); @Override UserType getType(); @Override void setType(UserType type); @Override Editor getEditor(); @Override void setEditor(Editor editor); @Override boolean isEmailChecked(); @Override void setEmailChecked(boolean isEmailChecked); @Override T getProperty(String key, T defaultValue); @Override T getProperty(String key, Class<T> valueClass); @Override List<String> getKeys(); @Override boolean containsKey(String key); @Override boolean isEmpty(); @Override T getProperty(String key, Class<T> valueClass, T defaultValue); @Override T getProperty(String key); @Override void setProperties(Map<String, Object> properties); @Override void save(); }
DefaultUserProperties implements UserProperties { @Override public void setProperties(Map<String, Object> properties) throws ConfigurationSaveException { getConfigurationSource().setProperties(properties); } DefaultUserProperties(ConfigurationSource configurationSource); @Override boolean displayHiddenDocuments(); @Override void setDisplayHiddenDocuments(boolean displayHiddenDocuments); @Override boolean isActive(); @Override void setActive(boolean isActive); @Override String getFirstName(); @Override void setFirstName(String firstName); @Override String getLastName(); @Override void setLastName(String lastName); @Override InternetAddress getEmail(); @Override void setEmail(InternetAddress emailAddress); @Override UserType getType(); @Override void setType(UserType type); @Override Editor getEditor(); @Override void setEditor(Editor editor); @Override boolean isEmailChecked(); @Override void setEmailChecked(boolean isEmailChecked); @Override T getProperty(String key, T defaultValue); @Override T getProperty(String key, Class<T> valueClass); @Override List<String> getKeys(); @Override boolean containsKey(String key); @Override boolean isEmpty(); @Override T getProperty(String key, Class<T> valueClass, T defaultValue); @Override T getProperty(String key); @Override void setProperties(Map<String, Object> properties); @Override void save();  }