Kotlin, Kotest, Property Based Testing.
amount of InputPositionDto in order to have always a positive total amount. fun createInputPositionsArb() = arbitrary { val positions = mutableListOf<InputPositionDto>() val amountOfPositions = amountPositionsArb.bind() var totalSum = 0.0 repeat (amountOfPositions) { val value =