@Test
public void executeTemplateQueryAndRetrieveBooleanTest() {

    Mockito.when(jdbcTemplate.queryForObject(Mockito.eq(sqlIsTemplateRegistered), Mockito.any(Object[].class), Mockito.eq(Integer.class))).thenReturn(new Integer(1));
    boolean result = spy.executeTemplateQueryAndRetrieveBoolean("templateName", sqlIsTemplateRegistered);
    Mockito.verify(jdbcTemplate).queryForObject(Mockito.eq(sqlIsTemplateRegistered), Mockito.any(Object[].class), Mockito.eq(Integer.class));
    Assert.assertTrue(result);
}