1
0
mirror of https://github.com/pcvolkmer/mv64e-onkostar-data.git synced 2025-09-14 00:12:52 +00:00

fix: possible NPE if no notes given

This commit is contained in:
2025-06-28 15:12:17 +02:00
parent 3119921ddd
commit c88f36f2ab
2 changed files with 11 additions and 3 deletions

View File

@@ -46,7 +46,8 @@ class TherapieplanDataMapperTest {
final var testData = Map.of(
"id", "1",
"patient_id", "42",
"wirkstoffe_json", "[{\"code\":\"\",\"name\":\"PARP-Inhibierung\",\"system\":\"UNREGISTERED\"}]"
"wirkstoffe_json", "[{\"code\":\"\",\"name\":\"PARP-Inhibierung\",\"system\":\"UNREGISTERED\"}]",
"protokollauszug", "Das ist ein Protokollauszug"
);
doAnswer(invocationOnMock -> {
@@ -69,6 +70,9 @@ class TherapieplanDataMapperTest {
.isEqualTo(Reference.builder().id("42").type("Patient").build());
assertThat(actual.getMedicationRecommendations()).hasSize(1);
assertThat(actual.getNotes()).hasSize(1);
assertThat(actual.getNotes().get(0)).isEqualTo("Das ist ein Protokollauszug");
}
}