assertEquals(0, Context.countActive());
}
protected DataUriGenerator createMockDataUriGenerator() {
try {
final DataUriGenerator uriGenerator = Mockito.mock(DataUriGenerator.class);
Mockito.when(uriGenerator.generateDataURI(Mockito.any(InputStream.class), Mockito.anyString())).thenReturn(
"data:image/png;base64,iVBORw0KG");
return uriGenerator;
} catch (final Exception e) {
throw new RuntimeException("Cannot create DataUriGenerator mock", e);
}