@Test
public void testInit() throws Exception {

    // prepare
    Map<String, ConfigurationItem> lastEntries = new HashMap<>();
    lastEntries.put("test_key", new ConfigurationItem("test_id", "test_profile"));
    Whitebox.setInternalState(model, "lastEntries", lastEntries);
    Whitebox.setInternalState(model, "selectedConfigItem", new ConfigurationItem("selected_test_id", "selected_test_profile"));
    // run
    model.init("config_var_pattern");
    // verify
    assertEquals("config_var_pattern", Whitebox.getInternalState(model, "configurationVariablePattern"));
    assertEquals(new ConfigurationItem("selected_test_id", "selected_test_profile"), Whitebox.getInternalState(model, "selectedConfigItem"));
    lastEntries = Whitebox.getInternalState(model, "lastEntries");
    assertEquals(1, lastEntries.size());
}