java template pattern demo check in