public String generateUniqueProjectKey(String projectName, String... extraProjectKeyItems) {
    String sqProjectKey = generateCompleteProjectKey(projectName, extraProjectKeyItems);
    sqProjectKey = truncateProjectKeyIfNecessary(sqProjectKey);
    return sanitizeProjectKey(sqProjectKey);
  }
@Test
  public void generateUniqueProjectKey_projectNameBiggerThanMaximumSize_shouldTruncateProjectNameAndPreserveUUID() {
    String fullProjectName = RandomStringUtils.randomAlphanumeric(MAX_PROJECT_KEY_SIZE + 50);

    String projectKey = projectKeyGenerator.generateUniqueProjectKey(fullProjectName);
    assertThat(projectKey)
      .hasSize(MAX_PROJECT_KEY_SIZE)
      .isEqualTo(generateExpectedKeyName(fullProjectName.substring(fullProjectName.length() + UUID_STRING.length() + 1 - MAX_PROJECT_KEY_SIZE)));
  }