@Test
public void shouldNotGenerateJoinCriteriaBadTablePath() throws Exception {

    createDataservice(DATASERVICE_NAME);
    URI dataservicesUri = _uriBuilder.workspaceDataservicesUri();
    URI uri = UriBuilder.fromUri(dataservicesUri).path(V1Constants.CRITERIA_FOR_JOIN_TABLES).build();
    // Required parms (tablePath, rhTablePath).
    // fails due to bad table path (does not resolve to a Table)
    KomodoDataserviceUpdateAttributes updateAttr = new KomodoDataserviceUpdateAttributes();
    updateAttr.setTablePath("/path/to/lhTable");
    updateAttr.setRhTablePath("/path/to/rhTable");
    ClientRequest request = request(uri, MediaType.APPLICATION_JSON_TYPE);
    addJsonConsumeContentType(request);
    addBody(request, updateAttr);
    ClientResponse<String> response = request.post(String.class);
    final String entity = response.getEntity();
    assertTrue(entity.contains("specified Table does not exist"));
}