@Override
    protected void validateDataImpl(TenantId tenantId, Dashboard dashboard) {
        validateString("Dashboard title", dashboard.getTitle());
        if (dashboard.getTenantId() == null) {
            throw new DataValidationException("Dashboard should be assigned to tenant!");
        } else {
            if (!tenantService.tenantExists(dashboard.getTenantId())) {
                throw new DataValidationException("Dashboard is referencing to non-existent tenant!");
            }
        }
    }
@Test
    void testValidateNameInvocation() {
        Dashboard dashboard = new Dashboard();
        dashboard.setTitle("flight control");
        dashboard.setTenantId(tenantId);

        validator.validateDataImpl(tenantId, dashboard);
        verify(validator).validateString("Dashboard title", dashboard.getTitle());
    }