### Question:
DataTypeNameIsDefaultTypeMessage extends ErrorMessage { @Override String getRegularMessage() { return translationService.format(DataTypeNameIsDefaultTypeMessage_RegularMessage); } @Inject  DataTypeNameIsDefaultTypeMessage(final TranslationService translationService);   }### Answer:
@Test public void testGetRegularMessage() { final String expectedErrorMessage = "Expected regular message."; final DataTypeNameIsDefaultTypeMessage errorMessage = new DataTypeNameIsDefaultTypeMessage(translationService); when(translationService.format(DataTypeNameIsDefaultTypeMessage_RegularMessage)).thenReturn(expectedErrorMessage); final String actualErrorMessage = errorMessage.getRegularMessage(); assertEquals(expectedErrorMessage, actualErrorMessage); }