void shouldSend5UsersInBatchesOf2Users()

in src/it/java/com/epam/digital/data/platform/user/service/KeycloakServiceTest.java [200:215]


  void shouldSend5UsersInBatchesOf2Users() throws IOException {
    // given
    customizeImportUsers(mockKeycloakServer, 200, "json/partial-import-response.json");

    var fileObject = getFileObject("json/users.csv");
    when(fileService.getFile(fileObject.getId())).thenReturn(fileObject);
    var contentStr = new String(fileObject.getContent(), StandardCharsets.UTF_8);
    when(vaultService.decrypt(contentStr)).thenReturn(contentStr);

    // when
    userPublishingService.publish(fileObject.getId());

    // then
    mockKeycloakServer.verify(3,
        postRequestedFor(urlEqualTo("/auth/admin/realms/some-realm/partialImport")));
  }