### Question:
Zendesk4Settings implements Settings { public void setApiUrl(final String apiUrl) { this.apiUrl = notEmpty(apiUrl, "apiUrl"); } Zendesk4Settings(final String apiUrl); @JsonCreator  Zendesk4Settings(@JsonProperty("apiUrl") String apiUrl,
                            @JsonProperty("zopimUrl") String zopimUrl,
                            @JsonProperty("account") String account,
                            @JsonProperty("type") String type,
                            @JsonProperty("syncTime") String syncTime,
                            @JsonProperty("syncTimeZone") String syncTimeZone); String getApiUrl(); void setApiUrl(final String apiUrl); String getZopimUrl(); void setZopimUrl(final String zopimUrl); String getAccount(); void setAccount(final String account); String getType(); String getSyncTime(); String getSyncTimeZone(); @Override ConnectorType getConnectorType(); @Override String toString(); static final String URL; }### Answer:
@Test(expectedExceptions = {IllegalArgumentException.class}) public void testSetApiUrlWithEmptyValue() throws Exception { final Zendesk4Settings settings = new Zendesk4Settings("old url"); settings.setApiUrl(""); }
@Test(expectedExceptions = {IllegalArgumentException.class}) public void testSetApiUrlWithNull() throws Exception { final Zendesk4Settings settings = new Zendesk4Settings("old url"); settings.setApiUrl(null); }
@Test public void testSetApiUrl() throws Exception { final Zendesk4Settings settings = new Zendesk4Settings("old url"); settings.setApiUrl("new url"); assertThat(settings.getApiUrl(), is("new url")); }