@Test public void getParser_should_return_parser_instance() { MyConfigurationModel model = new MyConfigurationModel(); Parser<? extends Grammar> p = mock(Parser.class); model.setParser(p); assertThat(model.getParser()).isEqualTo(p); }
@Override public Parser getParser() { ensureUpToDate(); return parser; }
AbstractConfigurationModel implements ConfigurationModel { @Override public Parser getParser() { ensureUpToDate(); return parser; } }
AbstractConfigurationModel implements ConfigurationModel { @Override public Parser getParser() { ensureUpToDate(); return parser; } AbstractConfigurationModel(); }
AbstractConfigurationModel implements ConfigurationModel { @Override public Parser getParser() { ensureUpToDate(); return parser; } 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 Parser getParser() { ensureUpToDate(); return parser; } AbstractConfigurationModel(); @Override void setUpdatedFlag(); @Override Charset getCharset(); @Override Parser getParser(); @Override List<Tokenizer> getTokenizers(); abstract Parser doGetParser(); abstract List<Tokenizer> doGetTokenizers();  }