### Question:
ReferencedDataTypeWarningMessage extends WarningMessage { @Override String getRegularMessage() { return translationService.format(ReferencedDataTypeWarningMessage_RegularMessage); } @Inject  ReferencedDataTypeWarningMessage(final TranslationService translationService);   }### Answer:
@Test public void testGetRegularMessage() { final String expectedWarningMessage = "Expected regular message."; final WarningMessage warningMessage = new ReferencedDataTypeWarningMessage(translationService); when(translationService.format(ReferencedDataTypeWarningMessage_RegularMessage)).thenReturn(expectedWarningMessage); final String actualWarningMessage = warningMessage.getRegularMessage(); assertEquals(expectedWarningMessage, actualWarningMessage); }