public Map<String, String> penRequestAllowed(PenRequest request) throws PenRequestException, SharedServiceClientException {
        final List<PenRequestStatus> result = repository.findByBsnAndDocTypeAndSequenceNo(request.getBsn(), request.getDocType(), request.getSequenceNo());
        checkIfTooSoonOrTooOften(result);
        return statusOK;
    }
@Test
    public void penRequest23HoursAfterLastRequestThrowsDWS1Exception() throws PenRequestException, SharedServiceClientException{
        // create a previous penRequest with a RequestDateTime
        status.setRequestDatetime(TEST_TIME.minusHours(23));
        mockStatusList.add(status);

        // return arraylist with one dummy penrequest
        Mockito.when(mockRepository.findByBsnAndDocTypeAndSequenceNo(request.getBsn(), request.getDocType(), request.getSequenceNo())).thenReturn(mockStatusList);

        Exception exception = assertThrows(PenRequestException.class, () -> {
            service.penRequestAllowed(request);
        });
        assertEquals("DWS1", exception.getMessage());
    }