mirror of
https://github.com/aljazceru/lnd-manageJ.git
synced 2026-01-22 23:44:21 +01:00
23 lines
716 B
Java
23 lines
716 B
Java
package de.cotto.lndmanagej.controller;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.extension.ExtendWith;
|
|
import org.mockito.InjectMocks;
|
|
import org.mockito.junit.jupiter.MockitoExtension;
|
|
import org.springframework.http.HttpStatus;
|
|
|
|
import static org.assertj.core.api.Assertions.assertThat;
|
|
|
|
@ExtendWith(MockitoExtension.class)
|
|
class NotFoundExceptionHandlerTest {
|
|
private static final NotFoundException EXCEPTION = new NotFoundException();
|
|
|
|
@InjectMocks
|
|
private NotFoundExceptionHandler exceptionHandler;
|
|
|
|
@Test
|
|
void mapsToNotFound() {
|
|
assertThat(exceptionHandler.handleException(EXCEPTION).getStatusCode())
|
|
.isEqualTo(HttpStatus.NOT_FOUND);
|
|
}
|
|
} |