Skip to content
Snippets Groups Projects
Commit 8a29bfd8 authored by Larissa Pereira's avatar Larissa Pereira
Browse files

resolving namespace conflict with gcp

parent 892bbcc4
Branches
Tags
1 merge request!144add correlation id to response header
......@@ -16,12 +16,12 @@ import org.springframework.stereotype.Component;
@Log
@Component
public class IndexFilter implements Filter {
public class IndexerFilter implements Filter {
private final DpsHeaders dpsHeaders;
@Autowired
public IndexFilter(DpsHeaders dpsHeaders) {
public IndexerFilter(DpsHeaders dpsHeaders) {
this.dpsHeaders = dpsHeaders;
}
......
......@@ -15,13 +15,13 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collections;
@RunWith(MockitoJUnitRunner.class)
public class IndexFilterTest {
public class IndexerFilterTest {
@InjectMocks
private IndexFilter indexFilter;
private IndexerFilter indexerFilter;
@Mock
private DpsHeaders dpsHeaders;
......@@ -34,7 +34,7 @@ public class IndexFilterTest {
Mockito.when(dpsHeaders.getCorrelationId()).thenReturn("correlation-id-value");
indexFilter.doFilter(httpServletRequest, httpServletResponse, filterChain);
indexerFilter.doFilter(httpServletRequest, httpServletResponse, filterChain);
Mockito.verify(httpServletResponse).addHeader("correlation-id", "correlation-id-value");
Mockito.verify(filterChain).doFilter(httpServletRequest, httpServletResponse);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment