AutonomiccsSystemVmTemplateJdbcDao extends JdbcDaoSupport { public boolean isTemplateRegisteredAndReady(String autonomiccsSystemVmTemplateName) { return executeTemplateQueryAndRetrieveBoolean(autonomiccsSystemVmTemplateName, sqlIsTemplateRegisteredAndReady); }  boolean isTemplateRegistered(String templateName); boolean isTemplateRegisteredAndReady(String autonomiccsSystemVmTemplateName); long searchAutonomiccsSystemVmTemplateIdForHypervisor(String autonomiccsSystemVmTemplateName);  }
@Test public void isTemplateRegisteredAndReadyTest() { Mockito.doReturn(true).when(spy).executeTemplateQueryAndRetrieveBoolean(Mockito.eq("TemplateName"), Mockito.eq(sqlIsTemplateRegisteredAndReady)); boolean result = spy.isTemplateRegisteredAndReady("TemplateName"); Mockito.verify(spy).executeTemplateQueryAndRetrieveBoolean(Mockito.eq("TemplateName"), Mockito.eq(sqlIsTemplateRegisteredAndReady)); Assert.assertTrue(result); }