### Question:
DefaultAliasDecider implements AliasDecider { public String decideAlias(ASTNode node) { if (node == null) { throw new NullPointerException("Node cannot be null"); } return aliasPrefix + (counter++); } DefaultAliasDecider(String alias);   DefaultAliasDecider(); String decideAlias(ASTNode node);  }### Answer:
@Test public void testDefaultAlias() throws Exception { DefaultAliasDecider aliasDecider = new DefaultAliasDecider(); ASTNode node = HQLParser.parseExpr("tbl1.col1"); assertEquals(aliasDecider.decideAlias(node), "alias0"); assertEquals(aliasDecider.decideAlias(node), "alias1"); DefaultAliasDecider aliasDecider2 = new DefaultAliasDecider(); assertEquals(aliasDecider2.decideAlias(node), "alias0"); assertEquals(aliasDecider.decideAlias(node), "alias2"); }
@Test public void testAliasPrefix() throws Exception { DefaultAliasDecider aliasDecider = new DefaultAliasDecider("testAlias"); ASTNode node = HQLParser.parseExpr("tbl1.col1"); assertEquals(aliasDecider.decideAlias(node), "testAlias0"); assertEquals(aliasDecider.decideAlias(node), "testAlias1"); DefaultAliasDecider aliasDecider2 = new DefaultAliasDecider("testAlias"); DefaultAliasDecider aliasDecider3 = new DefaultAliasDecider(); assertEquals(aliasDecider2.decideAlias(node), "testAlias0"); assertEquals(aliasDecider3.decideAlias(node), "alias0"); assertEquals(aliasDecider.decideAlias(node), "testAlias2"); }