@Test
public void validateBingLayer() {

    MapLayer input = new MapLayer();
    input.setType(OskariLayer.TYPE_BINGLAYER);
    try {
        LayerValidator.validateAndSanitizeLayerInput(input);
    } catch (IllegalArgumentException e) {
        assertEquals("Required field missing 'options.apiKey'", e.getMessage());
    }
    input.setOptions(new HashMap<>());
    try {
        LayerValidator.validateAndSanitizeLayerInput(input);
    } catch (IllegalArgumentException e) {
        assertEquals("Required field missing 'options.apiKey'", e.getMessage());
    }
    input.setLocale(createValidLocaleForLayer());
    HashMap jee = new HashMap<>();
    jee.put("apiKey", "testing");
    input.setOptions(jee);
    LayerValidator.validateAndSanitizeLayerInput(input);
}