### Question:
XmlSchemasPresenter implements Presenter, SettingsAware { @Override public void onLoad(final Settings settings) { if (settings == null) { throw new IllegalArgumentException("Settings must not be null."); } final Set<XmlSchemaDTO> schemas = new LinkedHashSet<XmlSchemaDTO>( Arrays.asList(settings.getXmlSchemas())); for (XmlSchemaDTO schema : schemas) { registerSchema(schema); } } XmlSchemasPresenter(final XmlSchemasView view); @Override void registerSchema(final XmlSchemaDTO schema); @Override void unregisterSchema(final XmlSchemaDTO schema); @Override void onLoad(final Settings settings); @Override void onUpdate(final Settings settings);  }### Answer:
@Test(expectedExceptions=IllegalArgumentException.class) public void testOnLoadIfNullSettings() { presenter.onLoad(null); }
@Test public void testOnLoad() { final XmlSchemaDTO dto1 = new XmlSchemaDTO(SAMPLE_OTHER_LOCATION); final XmlSchemaDTO dto2 = new XmlSchemaDTO(SAMPLE_ANOTHER_LOCATION); final Settings mockSettings = new MockSettings(dto1, dto2); mockView.addToList(same(dto1)); expectLastCall(); mockView.addToList(same(dto2)); expectLastCall(); EasyMockUnitils.replay(); presenter.onLoad(mockSettings); }