### Question:
SimpleSettingsManager implements SettingsManager { @Override public void updateSettings(final Settings settings) { if (settings == null) { throw new IllegalArgumentException("Settings must be not null."); } for (SettingsAware settingsAware: settingsAwareSet) { settingsAware.onUpdate(settings); } }  @Override void addSettingsAware(final SettingsAware settingsAware); @Override void loadSettings(final Settings settings); @Override void updateSettings(final Settings settings);  }### Answer:
@Test(expectedExceptions=IllegalArgumentException.class) public void testUpdateIfNullSettings() { manager.updateSettings(null); }
@Test public void testUpdate() { final Settings settings = new Settings(); mockSettingsAware.onUpdate(same(settings)); expectLastCall(); EasyMockUnitils.replay(); manager.updateSettings(settings); }