### Question:
JPQLJoinSelectSingleStatementBuilder extends JPQLStatementBuilder { @Override public JPQLStatement build() throws ODataJPARuntimeException { jpqlStatement = createStatement(createJPQLQuery()); this.context.setJPQLStatement(jpqlStatement.toString()); return jpqlStatement; } JPQLJoinSelectSingleStatementBuilder(final JPQLContextView context); @Override JPQLStatement build();  }### Answer:
@Test public void testBuild() throws Exception { setUp(getJoinClauseList()); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { JPQLStatement jpqlStatement = jpqlJoinSelectsingleStatementBuilder.build(); assertEquals( "SELECT gt1 FROM SOHeader soh JOIN soh.soItem soi JOIN soi.material mat WHERE soh.soId = 1 AND " + "soi.shId = soh.soId AND mat.id = 'abc'", jpqlStatement.toString()); } catch (ODataJPARuntimeException e) { fail("Should not have come here"); } }
@Test public void testJoinClauseAsNull() throws Exception { setUp(null); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { jpqlJoinSelectsingleStatementBuilder.build(); fail("Should not have come here"); } catch (ODataJPARuntimeException e) { assertTrue(true); } }
@Test public void testJoinClauseListAsEmpty() throws Exception { List<JPAJoinClause> joinClauseList = new ArrayList<JPAJoinClause>(); setUp(joinClauseList); JPQLJoinSelectSingleStatementBuilder jpqlJoinSelectsingleStatementBuilder = new JPQLJoinSelectSingleStatementBuilder(context); try { jpqlJoinSelectsingleStatementBuilder.build(); fail("Should not have come here"); } catch (ODataJPARuntimeException e) { assertTrue(true); } }