@Test
  public void testCreateWithWrongTitle() throws Exception {
    // Arrange
    DataAcquisitionProject project = UnitTestCreateDomainObjectUtils.buildDataAcquisitionProject();
    this.dataAcquisitionProjectRepository.save(project);

    Instrument instrument =
        UnitTestCreateDomainObjectUtils.buildInstrument(project.getId(), "SurveyId");

    // Act and Assert
    // set inconsistent title
    instrument.getTitle().setDe("");
    ;

    // create the instrument with the given id
    mockMvc
        .perform(
            put(API_INSTRUMENTS_URI + "/" + instrument.getId())
                .content(TestUtil.convertObjectToJsonBytes(instrument)))
        .andExpect(status().isBadRequest())
        .andExpect(
            jsonPath(
                "$.errors[0].message",
                is("instrument-management.error.instrument.title.i18n-string-size")));
  }