@Test
public void shouldGeneratedODataViewJoinNoCriteriaDDL() throws Exception {

    String EXPECTED_DDL = "CREATE VIEW MyView (RowId integer PRIMARY KEY,  LHCol1 string, LHCol2 string,  RHCol1 string, RHCol2 string) AS \n"
    + "SELECT ROW_NUMBER() OVER (ORDER BY A.LHCol1), A.LHCol1, A.LHCol2, B.RHCol1, B.RHCol2 \n"
    + "FROM \n"
    + "MyVDB.lhTable AS A \n"
    + "INNER JOIN \n"
    + "MyVDB.rhTable AS B ;";
    String lhTableAlias = "A";
    String rhTableAlias = "B";
    
    Table lhTable = createTable("MyVDB", VDB_PATH, "MyModel", "lhTable");
    Column lhCol1 = lhTable.addColumn(getTransaction(), "LHCol1");
    lhCol1.setDatatypeName(getTransaction(), "string");
    Column lhCol2 = lhTable.addColumn(getTransaction(), "LHCol2");
    lhCol2.setDatatypeName(getTransaction(), "string");
    
    Table rhTable = createTable("MyVDB", VDB_PATH, "MyModel", "rhTable");
    Column rhCol1 = rhTable.addColumn(getTransaction(), "RHCol1");
    rhCol1.setDatatypeName(getTransaction(), "string");
    Column rhCol2 = rhTable.addColumn(getTransaction(), "RHCol2");
    rhCol2.setDatatypeName(getTransaction(), "string");
            
    List<String> lhColNames = new ArrayList<String>();
    lhColNames.add("LHCol1");
    lhColNames.add("LHCol2");
    
    List<String> rhColNames = new ArrayList<String>();
    rhColNames.add("RHCol1");
    rhColNames.add("RHCol2");
    
    String viewDdl = ViewDdlBuilder.getODataViewJoinDdl(getTransaction(), "MyView", 
                                                        lhTable, lhTableAlias, lhColNames, 
                                                        rhTable, rhTableAlias, rhColNames, 
                                                        ViewDdlBuilder.JOIN_INNER, null);
    assertThat(viewDdl, is(EXPECTED_DDL));
}