@@ -227,12 +227,15 @@ public void testPseudonymizeExportList() {
227227 assertThat (export2 .getPathogenTestType3 (), is ("Confidential" ));
228228 assertThat (export2 .getOtherPathogenTestsDetails (), is ("2020-06-10 (Confidential, COVID-19, Pending)" ));
229229
230- // export contact sample not yet implemented
231- Optional <SampleExportDto > export3 = exportList .stream ().filter (t -> t .getUuid ().equals (sample3 .getUuid ())).findFirst ();
232- assertThat (export3 .isPresent (), is (false ));
233-
234- Optional <SampleExportDto > export4 = exportList .stream ().filter (t -> t .getUuid ().equals (sample4 .getUuid ())).findFirst ();
235- assertThat (export4 .isPresent (), is (false ));
230+ SampleExportDto export3 = exportList .stream ().filter (t -> t .getUuid ().equals (sample3 .getUuid ())).findFirst ().get ();
231+ assertThat (export3 .getAssociatedContact ().getContactName ().getFirstName (), is ("John" ));
232+ assertThat (export3 .getAssociatedContact ().getContactName ().getLastName (), is ("Smith" ));
233+ assertThat (export3 .getLab (), is ("Lab" ));
234+
235+ SampleExportDto export4 = exportList .stream ().filter (t -> t .getUuid ().equals (sample4 .getUuid ())).findFirst ().get ();
236+ assertThat (export4 .getAssociatedContact ().getContactName ().getFirstName (), is ("Confidential" ));
237+ assertThat (export4 .getAssociatedContact ().getContactName ().getLastName (), is ("Confidential" ));
238+ assertThat (export4 .getLab (), is ("Lab" ));
236239 }
237240
238241 private void createPathogenTest (SampleDto sample , UserDto user ) {
@@ -359,6 +362,7 @@ private SampleDto createCaseSample(CaseDataDto caze, UserDto reportingUser) {
359362
360363 private SampleDto createContactSample (ContactDto contactDto ) {
361364 Facility lab = new Facility ();
365+ lab .setName ("Lab" );
362366 getFacilityService ().persist (lab );
363367
364368 return creator .createSample (contactDto .toReference (), new Date (), new Date (), user1 .toReference (), SampleMaterial .BLOOD , lab );
0 commit comments