assertNull(filter.getCadiFilter());
}
@Test
public void doFilter_shouldSkipCADI_whenAafIsNotUsed() throws Exception {
//given
assertNull(filter.getCadiFilter());
}
@Test
public void doFilter_shouldSkipCADI_whenAafIsNotUsed() throws Exception {
//given
public void init_shouldFail_whenAafIsUsed_andInvalidCadiPropertiesSet() throws Exception {
//given
String invalidFilePath = "src/test/resources/notExisting.properties";
public void init_shouldFail_whenAafIsUsed_andInvalidCadiPropertiesSet() throws Exception {
//given
String invalidFilePath = "src/test/resources/notExisting.properties";
doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
//when
filter.init(filterConfig);
//then
doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
//when
filter.init(filterConfig);
//then
doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
filter.init(filterConfig);
filter.setCadiFilter(cadiFilterMock);
}
doReturn("src/test/resources/cadi.properties").when(dmaapConfig).getProperty(AAFAuthenticationFilter.CADI_PROPERTIES);
filter.init(filterConfig);
filter.setCadiFilter(cadiFilterMock);
}