DefaultOperatorContext implements OperatorContext { @Override public Operator getBySuffix(String suffix) { for (Operator operator : operators) { for (String token : operator.getTokens()) { if (token.equals(suffix)) { return operator; } } } return null; } DefaultOperatorContext();  DefaultOperatorContext(boolean registerDefaults); @Override void register(Operator operator); @Override Operator getBySuffix(String suffix);  }
@Test public void testLookingForNonExistentOperator() { final DefaultOperatorContext context = new DefaultOperatorContext(); assertThat(context.getBySuffix("xyz"), is(nullValue())); }