diff --git a/backend/src/test/java/ai/dragon/repository/FarmRepositoryTest.java b/backend/src/test/java/ai/dragon/repository/FarmRepositoryTest.java index 0a018cae..b7581785 100644 --- a/backend/src/test/java/ai/dragon/repository/FarmRepositoryTest.java +++ b/backend/src/test/java/ai/dragon/repository/FarmRepositoryTest.java @@ -29,7 +29,7 @@ void insertFarms() { farm.setName(farmName); farmRepository.save(farm); - FarmEntity retrievedFarm = farmRepository.getByUuid(farm.getUuid()); + FarmEntity retrievedFarm = farmRepository.getByUuid(farm.getUuid()).orElseThrow(); assertNotNull(farmRepository.getByUuid(retrievedFarm.getUuid())); assertEquals(farmName, retrievedFarm.getName()); } diff --git a/backend/src/test/java/ai/dragon/repository/ProviderRepositoryTest.java b/backend/src/test/java/ai/dragon/repository/ProviderRepositoryTest.java index 30602c4f..e6d9c8e5 100644 --- a/backend/src/test/java/ai/dragon/repository/ProviderRepositoryTest.java +++ b/backend/src/test/java/ai/dragon/repository/ProviderRepositoryTest.java @@ -31,7 +31,7 @@ void insertProviders() { provider.setType(ProviderType.ONNX); providerRepository.save(provider); - ProviderEntity retrievedProvider = providerRepository.getByUuid(provider.getUuid()); + ProviderEntity retrievedProvider = providerRepository.getByUuid(provider.getUuid()).orElseThrow(); assertNotNull(providerRepository.getByUuid(retrievedProvider.getUuid())); assertEquals(providerName, retrievedProvider.getName()); } diff --git a/backend/src/test/java/ai/dragon/repository/SiloRepositoryTest.java b/backend/src/test/java/ai/dragon/repository/SiloRepositoryTest.java index 84b296f7..0e48b2e9 100644 --- a/backend/src/test/java/ai/dragon/repository/SiloRepositoryTest.java +++ b/backend/src/test/java/ai/dragon/repository/SiloRepositoryTest.java @@ -29,7 +29,7 @@ void insertSilos() { silo.setName(siloName); siloRepository.save(silo); - SiloEntity retrievedSilo = siloRepository.getByUuid(silo.getUuid()); + SiloEntity retrievedSilo = siloRepository.getByUuid(silo.getUuid()).orElseThrow(); assertNotNull(siloRepository.getByUuid(retrievedSilo.getUuid())); assertEquals(siloName, retrievedSilo.getName()); }