PlannerValidationMessageTranslator implements ValidationMessageTranslator { @Override public boolean accept(final ValidationMessage message) { return MESSAGE_CLASS_KEY_MAPPING.containsKey(message.getClass().getName()); } @Inject  PlannerValidationMessageTranslator(final TranslationService translationService); @Override boolean accept(final ValidationMessage message); @Override ValidationMessage translate(final ValidationMessage messageToTranslate);  }
@Test public void acceptSupportedClass() { assertTrue(translator.accept(new PlanningSolutionToBeDuplicatedMessage(Level.ERROR))); }
@Test public void acceptUnsupportedClass() { assertFalse(translator.accept(new UnsupportedMessage())); }