Fix injection for unit tests

This commit is contained in:
René Pfeuffer
2018-10-26 14:54:55 +02:00
parent 9279bfca5f
commit 22069914b0
10 changed files with 36 additions and 30 deletions

View File

@@ -12,15 +12,15 @@ import javax.ws.rs.ext.ExceptionMapper;
public class ContextualExceptionMapper<E extends Throwable & ExceptionWithContext> implements ExceptionMapper<E> {
@Inject
private ExceptionWithContextToErrorDtoMapper mapper;
private static final Logger logger = LoggerFactory.getLogger(ContextualExceptionMapper.class);
private ExceptionWithContextToErrorDtoMapper mapper;
private final Response.Status status;
private final Class<E> type;
public ContextualExceptionMapper(Class<E> type, Response.Status status) {
public ContextualExceptionMapper(Class<E> type, Response.Status status, ExceptionWithContextToErrorDtoMapper mapper) {
this.mapper = mapper;
this.type = type;
this.status = status;
}