Skip to content

Commit a056f30

Browse files
committed
test: Builder.afterResponseHook null-guard
1 parent 9f4d57f commit a056f30

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/test/java/com/retailsvc/http/OpenApiServerBuilderTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ void bodyMapperRejectsNullMapper() {
126126
.isInstanceOf(NullPointerException.class);
127127
}
128128

129+
@Test
130+
void afterResponseHookRejectsNull() {
131+
OpenApiServer.Builder b = OpenApiServer.builder();
132+
assertThatThrownBy(() -> b.afterResponseHook(null)).isInstanceOf(NullPointerException.class);
133+
}
134+
129135
private static Spec testSpec() {
130136
Map<String, Object> raw =
131137
Map.of(

0 commit comments

Comments
 (0)