@Test public void getTokenizers_should_return_same_parser_instance_when_flag_not_set() { MyConfigurationModel model = new MyConfigurationModel(); List<Tokenizer> t = mock(List.class); model.setTokenizers(t); assertThat(model.getTokenizers()).isEqualTo(t); List<Tokenizer> t2 = mock(List.class); model.setTokenizers(t2); assertThat(model.getTokenizers()).isEqualTo(t); }
@Override public List<Tokenizer> getTokenizers() { ensureUpToDate(); return tokenizers; }
AbstractConfigurationModel implements ConfigurationModel { @Override public List<Tokenizer> getTokenizers() { ensureUpToDate(); return tokenizers; } }
AbstractConfigurationModel implements ConfigurationModel { @Override public List<Tokenizer> getTokenizers() { ensureUpToDate(); return tokenizers; } AbstractConfigurationModel(); }
AbstractConfigurationModel implements ConfigurationModel { @Override public List<Tokenizer> getTokenizers() { ensureUpToDate(); return tokenizers; } AbstractConfigurationModel(); @Override void setUpdatedFlag(); @Override Charset getCharset(); @Override Parser getParser(); @Override List<Tokenizer> getTokenizers(); abstract Parser doGetParser(); abstract List<Tokenizer> doGetTokenizers(); }
AbstractConfigurationModel implements ConfigurationModel { @Override public List<Tokenizer> getTokenizers() { ensureUpToDate(); return tokenizers; } AbstractConfigurationModel(); @Override void setUpdatedFlag(); @Override Charset getCharset(); @Override Parser getParser(); @Override List<Tokenizer> getTokenizers(); abstract Parser doGetParser(); abstract List<Tokenizer> doGetTokenizers();  }