DeliveryApi/ApiHandlers/tst/com/ilmlf/delivery/api/handlers/GetSlotsTest.java [104:121]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void emptyFarmId() throws SQLException {
    Slot testSlot = Slot.builder()
        .slotId(1)
        .from(LocalDateTime.now())
        .to(LocalDateTime.now())
        .deliveryDate(LocalDate.now())
        .build();

    Mockito.when(this.slotService.getSlots(Mockito.any(), Mockito.any(), Mockito.any()))
        .thenReturn(new ArrayList<>(List.of(testSlot)));

    APIGatewayProxyRequestEvent request = new APIGatewayProxyRequestEvent()
        .withPathParameters(Map.of(
            "farm-id", ""
        ));

    assertThrows(RuntimeException.class, () -> this.getSlots.handleRequest(request, Mockito.mock(Context.class)));
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



DeliveryApi/ApiHandlers/tst/com/ilmlf/delivery/api/handlers/GetSlotsTest.java [142:159]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void invalidFarmId() throws SQLException {
    Slot testSlot = Slot.builder()
        .slotId(1)
        .from(LocalDateTime.now())
        .to(LocalDateTime.now())
        .deliveryDate(LocalDate.now())
        .build();

    Mockito.when(this.slotService.getSlots(Mockito.any(), Mockito.any(), Mockito.any()))
        .thenReturn(new ArrayList<>(List.of(testSlot)));

    APIGatewayProxyRequestEvent request = new APIGatewayProxyRequestEvent()
        .withPathParameters(Map.of(
            "farm-id", "asdf"
        ));

    assertThrows(RuntimeException.class, () -> this.getSlots.handleRequest(request, Mockito.mock(Context.class)));
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



