@Test public void testInvalidHeight() throws IOException { try { Map<String, Object> config = new HashMap<>(); config.put(SizeHandler.PN_WIDTH, 200); config.put(SizeHandler.PN_HEIGHT, "h"); sizer.handle(builder, new MockResource("/conf", config, Mockito.mock(ResourceResolver.class))); fail(); } catch (IOException | IllegalArgumentException e) { } }
@Override public void handle(Builder<? extends InputStream> builder, Resource config) throws IOException { int width = config.getValueMap().get(PN_WIDTH, -1); int height = config.getValueMap().get(PN_HEIGHT, -1); builder.size(width, height); }
SizeHandler implements TransformationHandler { @Override public void handle(Builder<? extends InputStream> builder, Resource config) throws IOException { int width = config.getValueMap().get(PN_WIDTH, -1); int height = config.getValueMap().get(PN_HEIGHT, -1); builder.size(width, height); } }
SizeHandler implements TransformationHandler { @Override public void handle(Builder<? extends InputStream> builder, Resource config) throws IOException { int width = config.getValueMap().get(PN_WIDTH, -1); int height = config.getValueMap().get(PN_HEIGHT, -1); builder.size(width, height); }  }
SizeHandler implements TransformationHandler { @Override public void handle(Builder<? extends InputStream> builder, Resource config) throws IOException { int width = config.getValueMap().get(PN_WIDTH, -1); int height = config.getValueMap().get(PN_HEIGHT, -1); builder.size(width, height); }  @Override String getResourceType(); @Override void handle(Builder<? extends InputStream> builder, Resource config); }
SizeHandler implements TransformationHandler { @Override public void handle(Builder<? extends InputStream> builder, Resource config) throws IOException { int width = config.getValueMap().get(PN_WIDTH, -1); int height = config.getValueMap().get(PN_HEIGHT, -1); builder.size(width, height); }  @Override String getResourceType(); @Override void handle(Builder<? extends InputStream> builder, Resource config); static final String PN_HEIGHT; static final String PN_WIDTH; }