public static AuthorizationDoc fromDto(IndexType indexType, IndexPermissions dto) {
    AuthorizationDoc res = new AuthorizationDoc(indexType, dto.getEntityUuid());
    if (dto.isAllowAnyone()) {
      return res.setAllowAnyone();
    }
    return res.setRestricted(dto.getGroupUuids(), dto.getUserUuids());
  }
@Test
  @UseDataProvider("dtos")
  public void getRouting_returns_projectUuid(IndexPermissions dto) {
    AuthorizationDoc underTest = AuthorizationDoc.fromDto(IndexType.main(Index.simple("foo"), "bar"), dto);

    assertThat(underTest.getRouting()).contains(dto.getEntityUuid());
  }