Removed vavr related code

This commit is contained in:
Arnold Galovics
2022-12-29 12:38:16 +01:00
committed by Arnold Gálovics
parent 797ba293c0
commit 7a9e696ac8
6 changed files with 81 additions and 74 deletions
@@ -220,8 +220,9 @@ public class BatchRequestsIntegrationTest {
// Verify that each loan has been applied successfully
for (BatchResponse res : response) {
Assertions.assertFalse(io.vavr.collection.List.ofAll(res.getHeaders())
.find(header -> header.getName().equals(AbstractIdempotentCommandException.IDEMPOTENT_CACHE_HEADER)).isDefined(),
Assertions.assertFalse(
res.getHeaders().stream()
.anyMatch(header -> header.getName().equals(AbstractIdempotentCommandException.IDEMPOTENT_CACHE_HEADER)),
"First can not be cached!");
Assertions.assertEquals(200L, (long) res.getStatusCode(), "Verify Status Code 200");
}
@@ -232,9 +233,9 @@ public class BatchRequestsIntegrationTest {
// Verify that each loan has been applied successfully
for (BatchResponse res : secondResponse) {
Assertions.assertEquals("true",
io.vavr.collection.List.ofAll(res.getHeaders())
.find(header -> header.getName().equals(AbstractIdempotentCommandException.IDEMPOTENT_CACHE_HEADER))
.map(Header::getValue).get(),
res.getHeaders().stream()
.filter(header -> header.getName().equals(AbstractIdempotentCommandException.IDEMPOTENT_CACHE_HEADER))
.map(Header::getValue).findAny().get(),
"Not cached by idempotency key!");
Assertions.assertEquals(200L, (long) res.getStatusCode(), "Verify Status Code 200");
}
@@ -37,6 +37,7 @@ import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatterBuilder;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauReportData;
import org.apache.fineract.integrationtests.common.CreditBureauConfigurationHelper;
import org.apache.fineract.integrationtests.common.CreditBureauIntegrationHelper;
@@ -80,9 +81,8 @@ public class CreditBureauTest {
List<Map<String, Object>> configurations = CreditBureauConfigurationHelper.getCreditBureauConfiguration(requestSpec, responseSpec,
"1");
Assertions.assertNotNull(configurations);
Map<String, Integer> currentConfiguration = io.vavr.collection.List.ofAll(configurations)
.toMap(k -> String.valueOf(k.get("configurationKey")).toUpperCase(), v -> (int) v.get("creditBureauConfigurationId"))
.toJavaMap();
Map<String, Integer> currentConfiguration = configurations.stream().collect(Collectors
.toMap(k -> String.valueOf(k.get("configurationKey")).toUpperCase(), v -> (int) v.get("creditBureauConfigurationId")));
final Object usernameConfigurationId = CreditBureauConfigurationHelper.updateCreditBureauConfiguration(this.requestSpec,
this.responseSpec, currentConfiguration.get("USERNAME").intValue(), "USERNAME", "testUser");
Assertions.assertNotNull(usernameConfigurationId);