### Question:
DataTypeNameValidator { public boolean isValid(final DataType dataType) { if (isBlank(dataType)) { flashMessageEvent.fire(blankErrorMessage.getFlashMessage(dataType)); return false; } if (isNotUnique(dataType)) { flashMessageEvent.fire(notUniqueErrorMessage.getFlashMessage(dataType)); return false; } if (isDefault(dataType)) { flashMessageEvent.fire(nameIsDefaultTypeMessage.getFlashMessage(dataType)); return false; } return true; } @Inject  DataTypeNameValidator(final Event<FlashMessage> flashMessageEvent,
                                 final DataTypeNameIsBlankErrorMessage blankErrorMessage,
                                 final DataTypeNameIsNotUniqueErrorMessage notUniqueErrorMessage,
                                 final DataTypeNameIsDefaultTypeMessage nameIsDefaultTypeMessage,
                                 final DataTypeStore dataTypeStore); boolean isValid(final DataType dataType); boolean isNotUnique(final DataType dataType); List<DataType> siblings(final DataType dataType);  }### Answer:
@Test public void testIsValid() { final DataType dataType = mock(DataType.class); doReturn(false).when(validator).isBlank(dataType); doReturn(false).when(validator).isNotUnique(dataType); doReturn(false).when(validator).isDefault(dataType); final boolean isValid = validator.isValid(dataType); verify(flashMessageEvent, never()).fire(any()); verify(flashMessageEvent, never()).fire(any()); assertTrue(isValid); }