package com.oguerreiro.resilient.web.rest;

import static com.oguerreiro.resilient.domain.InputDataUploadLogAsserts.*;
import static com.oguerreiro.resilient.web.rest.TestUtil.createUpdateProxyForBean;
import static org.assertj.core.api.Assertions.assertThat;
import static org.hamcrest.Matchers.hasItem;
import static org.mockito.Mockito.*;
import static org.springframework.security.test.web.servlet.request.SecurityMockMvcRequestPostProcessors.csrf;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.oguerreiro.resilient.IntegrationTest;
import com.oguerreiro.resilient.domain.InputDataUploadLog;
import com.oguerreiro.resilient.repository.InputDataUploadLogRepository;
import com.oguerreiro.resilient.service.InputDataUploadLogService;
import com.oguerreiro.resilient.service.dto.InputDataUploadLogDTO;
import com.oguerreiro.resilient.service.mapper.InputDataUploadLogMapper;
import jakarta.persistence.EntityManager;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Random;
import java.util.concurrent.atomic.AtomicLong;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.transaction.annotation.Transactional;

/**
 * Integration tests for the {@link InputDataUploadLogResource} REST controller.
 */
@IntegrationTest
@ExtendWith(MockitoExtension.class)
@AutoConfigureMockMvc
@WithMockUser
class InputDataUploadLogResourceIT {

    private static final String DEFAULT_LOG_MESSAGE = "AAAAAAAAAA";
    private static final String UPDATED_LOG_MESSAGE = "BBBBBBBBBB";

    private static final Instant DEFAULT_CREATION_DATE = Instant.ofEpochMilli(0L);
    private static final Instant UPDATED_CREATION_DATE = Instant.now().truncatedTo(ChronoUnit.MILLIS);

    private static final String DEFAULT_CREATION_USERNAME = "AAAAAAAAAA";
    private static final String UPDATED_CREATION_USERNAME = "BBBBBBBBBB";

    private static final Integer DEFAULT_VERSION = 1;
    private static final Integer UPDATED_VERSION = 2;

    private static final String ENTITY_API_URL = "/api/input-data-upload-logs";
    private static final String ENTITY_API_URL_ID = ENTITY_API_URL + "/{id}";

    private static Random random = new Random();
    private static AtomicLong longCount = new AtomicLong(random.nextInt() + (2 * Integer.MAX_VALUE));

    @Autowired
    private ObjectMapper om;

    @Autowired
    private InputDataUploadLogRepository inputDataUploadLogRepository;

    @Mock
    private InputDataUploadLogRepository inputDataUploadLogRepositoryMock;

    @Autowired
    private InputDataUploadLogMapper inputDataUploadLogMapper;

    @Mock
    private InputDataUploadLogService inputDataUploadLogServiceMock;

    @Autowired
    private EntityManager em;

    @Autowired
    private MockMvc restInputDataUploadLogMockMvc;

    private InputDataUploadLog inputDataUploadLog;

    private InputDataUploadLog insertedInputDataUploadLog;

    /**
     * Create an entity for this test.
     *
     * This is a static method, as tests for other entities might also need it,
     * if they test an entity which requires the current entity.
     */
    public static InputDataUploadLog createEntity(EntityManager em) {
        InputDataUploadLog inputDataUploadLog = new InputDataUploadLog()
            .logMessage(DEFAULT_LOG_MESSAGE)
            .creationDate(DEFAULT_CREATION_DATE)
            .creationUsername(DEFAULT_CREATION_USERNAME)
            .version(DEFAULT_VERSION);
        return inputDataUploadLog;
    }

    /**
     * Create an updated entity for this test.
     *
     * This is a static method, as tests for other entities might also need it,
     * if they test an entity which requires the current entity.
     */
    public static InputDataUploadLog createUpdatedEntity(EntityManager em) {
        InputDataUploadLog inputDataUploadLog = new InputDataUploadLog()
            .logMessage(UPDATED_LOG_MESSAGE)
            .creationDate(UPDATED_CREATION_DATE)
            .creationUsername(UPDATED_CREATION_USERNAME)
            .version(UPDATED_VERSION);
        return inputDataUploadLog;
    }

    @BeforeEach
    public void initTest() {
        inputDataUploadLog = createEntity(em);
    }

    @AfterEach
    public void cleanup() {
        if (insertedInputDataUploadLog != null) {
            inputDataUploadLogRepository.delete(insertedInputDataUploadLog);
            insertedInputDataUploadLog = null;
        }
    }

    @Test
    @Transactional
    void createInputDataUploadLog() throws Exception {
        long databaseSizeBeforeCreate = getRepositoryCount();
        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);
        var returnedInputDataUploadLogDTO = om.readValue(
            restInputDataUploadLogMockMvc
                .perform(
                    post(ENTITY_API_URL)
                        .with(csrf())
                        .contentType(MediaType.APPLICATION_JSON)
                        .content(om.writeValueAsBytes(inputDataUploadLogDTO))
                )
                .andExpect(status().isCreated())
                .andReturn()
                .getResponse()
                .getContentAsString(),
            InputDataUploadLogDTO.class
        );

        // Validate the InputDataUploadLog in the database
        assertIncrementedRepositoryCount(databaseSizeBeforeCreate);
        var returnedInputDataUploadLog = inputDataUploadLogMapper.toEntity(returnedInputDataUploadLogDTO);
        assertInputDataUploadLogUpdatableFieldsEquals(
            returnedInputDataUploadLog,
            getPersistedInputDataUploadLog(returnedInputDataUploadLog)
        );

        insertedInputDataUploadLog = returnedInputDataUploadLog;
    }

    @Test
    @Transactional
    void createInputDataUploadLogWithExistingId() throws Exception {
        // Create the InputDataUploadLog with an existing ID
        inputDataUploadLog.setId(1L);
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        long databaseSizeBeforeCreate = getRepositoryCount();

        // An entity with an existing ID cannot be created, so this API call must fail
        restInputDataUploadLogMockMvc
            .perform(
                post(ENTITY_API_URL)
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeCreate);
    }

    @Test
    @Transactional
    void checkLogMessageIsRequired() throws Exception {
        long databaseSizeBeforeTest = getRepositoryCount();
        // set the field null
        inputDataUploadLog.setLogMessage(null);

        // Create the InputDataUploadLog, which fails.
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        restInputDataUploadLogMockMvc
            .perform(
                post(ENTITY_API_URL)
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        assertSameRepositoryCount(databaseSizeBeforeTest);
    }

    @Test
    @Transactional
    void checkCreationDateIsRequired() throws Exception {
        long databaseSizeBeforeTest = getRepositoryCount();
        // set the field null
        inputDataUploadLog.setCreationDate(null);

        // Create the InputDataUploadLog, which fails.
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        restInputDataUploadLogMockMvc
            .perform(
                post(ENTITY_API_URL)
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        assertSameRepositoryCount(databaseSizeBeforeTest);
    }

    @Test
    @Transactional
    void checkCreationUsernameIsRequired() throws Exception {
        long databaseSizeBeforeTest = getRepositoryCount();
        // set the field null
        inputDataUploadLog.setCreationUsername(null);

        // Create the InputDataUploadLog, which fails.
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        restInputDataUploadLogMockMvc
            .perform(
                post(ENTITY_API_URL)
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        assertSameRepositoryCount(databaseSizeBeforeTest);
    }

    @Test
    @Transactional
    void getAllInputDataUploadLogs() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        // Get all the inputDataUploadLogList
        restInputDataUploadLogMockMvc
            .perform(get(ENTITY_API_URL + "?sort=id,desc"))
            .andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
            .andExpect(jsonPath("$.[*].id").value(hasItem(inputDataUploadLog.getId().intValue())))
            .andExpect(jsonPath("$.[*].logMessage").value(hasItem(DEFAULT_LOG_MESSAGE)))
            .andExpect(jsonPath("$.[*].creationDate").value(hasItem(DEFAULT_CREATION_DATE.toString())))
            .andExpect(jsonPath("$.[*].creationUsername").value(hasItem(DEFAULT_CREATION_USERNAME)))
            .andExpect(jsonPath("$.[*].version").value(hasItem(DEFAULT_VERSION)));
    }

    @SuppressWarnings({ "unchecked" })
    void getAllInputDataUploadLogsWithEagerRelationshipsIsEnabled() throws Exception {
        when(inputDataUploadLogServiceMock.findAllWithEagerRelationships(any())).thenReturn(new PageImpl(new ArrayList<>()));

        restInputDataUploadLogMockMvc.perform(get(ENTITY_API_URL + "?eagerload=true")).andExpect(status().isOk());

        verify(inputDataUploadLogServiceMock, times(1)).findAllWithEagerRelationships(any());
    }

    @SuppressWarnings({ "unchecked" })
    void getAllInputDataUploadLogsWithEagerRelationshipsIsNotEnabled() throws Exception {
        when(inputDataUploadLogServiceMock.findAllWithEagerRelationships(any())).thenReturn(new PageImpl(new ArrayList<>()));

        restInputDataUploadLogMockMvc.perform(get(ENTITY_API_URL + "?eagerload=false")).andExpect(status().isOk());
        verify(inputDataUploadLogRepositoryMock, times(1)).findAll(any(Pageable.class));
    }

    @Test
    @Transactional
    void getInputDataUploadLog() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        // Get the inputDataUploadLog
        restInputDataUploadLogMockMvc
            .perform(get(ENTITY_API_URL_ID, inputDataUploadLog.getId()))
            .andExpect(status().isOk())
            .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))
            .andExpect(jsonPath("$.id").value(inputDataUploadLog.getId().intValue()))
            .andExpect(jsonPath("$.logMessage").value(DEFAULT_LOG_MESSAGE))
            .andExpect(jsonPath("$.creationDate").value(DEFAULT_CREATION_DATE.toString()))
            .andExpect(jsonPath("$.creationUsername").value(DEFAULT_CREATION_USERNAME))
            .andExpect(jsonPath("$.version").value(DEFAULT_VERSION));
    }

    @Test
    @Transactional
    void getNonExistingInputDataUploadLog() throws Exception {
        // Get the inputDataUploadLog
        restInputDataUploadLogMockMvc.perform(get(ENTITY_API_URL_ID, Long.MAX_VALUE)).andExpect(status().isNotFound());
    }

    @Test
    @Transactional
    void putExistingInputDataUploadLog() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        long databaseSizeBeforeUpdate = getRepositoryCount();

        // Update the inputDataUploadLog
        InputDataUploadLog updatedInputDataUploadLog = inputDataUploadLogRepository.findById(inputDataUploadLog.getId()).orElseThrow();
        // Disconnect from session so that the updates on updatedInputDataUploadLog are not directly saved in db
        em.detach(updatedInputDataUploadLog);
        updatedInputDataUploadLog
            .logMessage(UPDATED_LOG_MESSAGE)
            .creationDate(UPDATED_CREATION_DATE)
            .creationUsername(UPDATED_CREATION_USERNAME)
            .version(UPDATED_VERSION);
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(updatedInputDataUploadLog);

        restInputDataUploadLogMockMvc
            .perform(
                put(ENTITY_API_URL_ID, inputDataUploadLogDTO.getId())
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isOk());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
        assertPersistedInputDataUploadLogToMatchAllProperties(updatedInputDataUploadLog);
    }

    @Test
    @Transactional
    void putNonExistingInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If the entity doesn't have an ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                put(ENTITY_API_URL_ID, inputDataUploadLogDTO.getId())
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void putWithIdMismatchInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If url ID doesn't match entity ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                put(ENTITY_API_URL_ID, longCount.incrementAndGet())
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void putWithMissingIdPathParamInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If url ID doesn't match entity ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                put(ENTITY_API_URL)
                    .with(csrf())
                    .contentType(MediaType.APPLICATION_JSON)
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isMethodNotAllowed());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void partialUpdateInputDataUploadLogWithPatch() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        long databaseSizeBeforeUpdate = getRepositoryCount();

        // Update the inputDataUploadLog using partial update
        InputDataUploadLog partialUpdatedInputDataUploadLog = new InputDataUploadLog();
        partialUpdatedInputDataUploadLog.setId(inputDataUploadLog.getId());

        partialUpdatedInputDataUploadLog.logMessage(UPDATED_LOG_MESSAGE).creationDate(UPDATED_CREATION_DATE);

        restInputDataUploadLogMockMvc
            .perform(
                patch(ENTITY_API_URL_ID, partialUpdatedInputDataUploadLog.getId())
                    .with(csrf())
                    .contentType("application/merge-patch+json")
                    .content(om.writeValueAsBytes(partialUpdatedInputDataUploadLog))
            )
            .andExpect(status().isOk());

        // Validate the InputDataUploadLog in the database

        assertSameRepositoryCount(databaseSizeBeforeUpdate);
        assertInputDataUploadLogUpdatableFieldsEquals(
            createUpdateProxyForBean(partialUpdatedInputDataUploadLog, inputDataUploadLog),
            getPersistedInputDataUploadLog(inputDataUploadLog)
        );
    }

    @Test
    @Transactional
    void fullUpdateInputDataUploadLogWithPatch() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        long databaseSizeBeforeUpdate = getRepositoryCount();

        // Update the inputDataUploadLog using partial update
        InputDataUploadLog partialUpdatedInputDataUploadLog = new InputDataUploadLog();
        partialUpdatedInputDataUploadLog.setId(inputDataUploadLog.getId());

        partialUpdatedInputDataUploadLog
            .logMessage(UPDATED_LOG_MESSAGE)
            .creationDate(UPDATED_CREATION_DATE)
            .creationUsername(UPDATED_CREATION_USERNAME)
            .version(UPDATED_VERSION);

        restInputDataUploadLogMockMvc
            .perform(
                patch(ENTITY_API_URL_ID, partialUpdatedInputDataUploadLog.getId())
                    .with(csrf())
                    .contentType("application/merge-patch+json")
                    .content(om.writeValueAsBytes(partialUpdatedInputDataUploadLog))
            )
            .andExpect(status().isOk());

        // Validate the InputDataUploadLog in the database

        assertSameRepositoryCount(databaseSizeBeforeUpdate);
        assertInputDataUploadLogUpdatableFieldsEquals(
            partialUpdatedInputDataUploadLog,
            getPersistedInputDataUploadLog(partialUpdatedInputDataUploadLog)
        );
    }

    @Test
    @Transactional
    void patchNonExistingInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If the entity doesn't have an ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                patch(ENTITY_API_URL_ID, inputDataUploadLogDTO.getId())
                    .with(csrf())
                    .contentType("application/merge-patch+json")
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void patchWithIdMismatchInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If url ID doesn't match entity ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                patch(ENTITY_API_URL_ID, longCount.incrementAndGet())
                    .with(csrf())
                    .contentType("application/merge-patch+json")
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isBadRequest());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void patchWithMissingIdPathParamInputDataUploadLog() throws Exception {
        long databaseSizeBeforeUpdate = getRepositoryCount();
        inputDataUploadLog.setId(longCount.incrementAndGet());

        // Create the InputDataUploadLog
        InputDataUploadLogDTO inputDataUploadLogDTO = inputDataUploadLogMapper.toDto(inputDataUploadLog);

        // If url ID doesn't match entity ID, it will throw BadRequestAlertException
        restInputDataUploadLogMockMvc
            .perform(
                patch(ENTITY_API_URL)
                    .with(csrf())
                    .contentType("application/merge-patch+json")
                    .content(om.writeValueAsBytes(inputDataUploadLogDTO))
            )
            .andExpect(status().isMethodNotAllowed());

        // Validate the InputDataUploadLog in the database
        assertSameRepositoryCount(databaseSizeBeforeUpdate);
    }

    @Test
    @Transactional
    void deleteInputDataUploadLog() throws Exception {
        // Initialize the database
        insertedInputDataUploadLog = inputDataUploadLogRepository.saveAndFlush(inputDataUploadLog);

        long databaseSizeBeforeDelete = getRepositoryCount();

        // Delete the inputDataUploadLog
        restInputDataUploadLogMockMvc
            .perform(delete(ENTITY_API_URL_ID, inputDataUploadLog.getId()).with(csrf()).accept(MediaType.APPLICATION_JSON))
            .andExpect(status().isNoContent());

        // Validate the database contains one less item
        assertDecrementedRepositoryCount(databaseSizeBeforeDelete);
    }

    protected long getRepositoryCount() {
        return inputDataUploadLogRepository.count();
    }

    protected void assertIncrementedRepositoryCount(long countBefore) {
        assertThat(countBefore + 1).isEqualTo(getRepositoryCount());
    }

    protected void assertDecrementedRepositoryCount(long countBefore) {
        assertThat(countBefore - 1).isEqualTo(getRepositoryCount());
    }

    protected void assertSameRepositoryCount(long countBefore) {
        assertThat(countBefore).isEqualTo(getRepositoryCount());
    }

    protected InputDataUploadLog getPersistedInputDataUploadLog(InputDataUploadLog inputDataUploadLog) {
        return inputDataUploadLogRepository.findById(inputDataUploadLog.getId()).orElseThrow();
    }

    protected void assertPersistedInputDataUploadLogToMatchAllProperties(InputDataUploadLog expectedInputDataUploadLog) {
        assertInputDataUploadLogAllPropertiesEquals(expectedInputDataUploadLog, getPersistedInputDataUploadLog(expectedInputDataUploadLog));
    }

    protected void assertPersistedInputDataUploadLogToMatchUpdatableProperties(InputDataUploadLog expectedInputDataUploadLog) {
        assertInputDataUploadLogAllUpdatablePropertiesEquals(
            expectedInputDataUploadLog,
            getPersistedInputDataUploadLog(expectedInputDataUploadLog)
        );
    }
}
