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