@Test
public void shouldUpdateConnection() throws Exception {

    createConnection(CONNECTION_NAME);
    // put
    Properties settings = _uriBuilder.createSettings(SettingNames.CONNECTION_NAME, CONNECTION_NAME);
    _uriBuilder.addSetting(settings, SettingNames.PARENT_PATH, _uriBuilder.workspaceConnectionsUri());
    URI uri = _uriBuilder.connectionUri(LinkType.SELF, settings);
    ClientRequest request = request(uri, MediaType.APPLICATION_JSON_TYPE);
    KomodoConnectionAttributes rcAttr = new KomodoConnectionAttributes();
    rcAttr.setJndi("jndi:/MySqlDS1");
    rcAttr.setDriver("mysql");
    rcAttr.setJdbc(true);
    rcAttr.setParameter("username", "test");
    rcAttr.setParameter("password", "myPassword");
    addBody(request, rcAttr);
    ClientResponse<String> response = request.put(String.class);
    final String entity = response.getEntity();
    assertThat(entity, is(notNullValue()));
    System.out.println("Response:\n" + entity);
    RestConnection rsObj = KomodoJsonMarshaller.unmarshall(entity, RestConnection.class);
    assertEquals(rcAttr.getDriver(), rsObj.getDriverName());
    assertEquals(rcAttr.getJndi(), rsObj.getJndiName());
    assertEquals(rcAttr.isJdbc(), rsObj.isJdbc());
    List<RestProperty> rsProps = rsObj.getProperties();
    for (Entry<String, Object> parameter : rcAttr.getParameters().entrySet()) {
        RestProperty rsProp = null;
        for (RestProperty rsp : rsProps) {
            if (! rsp.getName().equals(parameter.getKey()))
                continue;
            rsProp = rsp;
        }
        assertNotNull(parameter.getKey() + " property not handled", rsProp);
        assertEquals(parameter.getValue(), rsProp.getValue());
    }
}