@Test
public void shouldGenerateJoinCriteriaEmpty() throws Exception {

    loadVdbs();
    createDataservice(DATASERVICE_NAME);
    URI dataservicesUri = _uriBuilder.workspaceDataservicesUri();
    URI uri = UriBuilder.fromUri(dataservicesUri).path(V1Constants.CRITERIA_FOR_JOIN_TABLES).build();
    // Required parms (tablePath, rhTablePath).
    // Valid entries - should generate join criteria (empty)
    KomodoDataserviceUpdateAttributes updateAttr = new KomodoDataserviceUpdateAttributes();
    updateAttr.setTablePath("tko:komodo/tko:workspace/"+USER_NAME+"/MyPartsVDB_Dynamic/PartsSS/PARTS");
    updateAttr.setRhTablePath("tko:komodo/tko:workspace/"+USER_NAME+"/MyPartsVDB_Dynamic/PartsSS/STATUS");
    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();
    
    // Info is returned but the criteria is empty, since there are no table pk-fk relationships
    assertThat(entity, is(notNullValue()));
    RestDataserviceViewInfo viewInfo = KomodoJsonMarshaller.unmarshall(entity, RestDataserviceViewInfo.class);
    
    assertTrue("CRITERIA".equals(viewInfo.getInfoType()));
    assertEquals(viewInfo.getCriteriaPredicates().size(), 0);
}