@Test
public void shouldNotSetServiceVdbForJoinTablesBadDdl() throws Exception {

    loadVdbs();
    createDataservice(DATASERVICE_NAME);
    
    URI dataservicesUri = _uriBuilder.workspaceDataservicesUri();
    URI uri = UriBuilder.fromUri(dataservicesUri).path(V1Constants.SERVICE_VDB_FOR_JOIN_TABLES).build();
    KomodoDataserviceUpdateAttributes updateAttr = new KomodoDataserviceUpdateAttributes();
    updateAttr.setDataserviceName(DATASERVICE_NAME);
    updateAttr.setTablePath("tko:komodo/tko:workspace/"+USER_NAME+"/Portfolio/PersonalValuations/Sheet1");
    updateAttr.setRhTablePath("tko:komodo/tko:workspace/"+USER_NAME+"/Portfolio/PersonalValuations/Sheet1");
    updateAttr.setModelSourcePath("tko:komodo/tko:workspace/"+USER_NAME+"/Portfolio/Accounts/vdb:sources/h2-connector");
    updateAttr.setRhModelSourcePath("tko:komodo/tko:workspace/"+USER_NAME+"/Portfolio/Accounts/vdb:sources/h2-connector");
    updateAttr.setViewDdl("CREATE VIEW blah blah");
    ClientRequest request = request(uri, MediaType.APPLICATION_JSON_TYPE);
    addJsonConsumeContentType(request);
    addBody(request, updateAttr);
    ClientResponse<String> response = request.post(String.class);
    // Bogus DDL results in an error
    final String entity = response.getEntity();
    assertTrue(entity.contains("DDL Parsing encountered a problem"));
}