AutonomiccsSystemVirtualMachinesTemplateRegister implements InitializingBean { protected Map<Object, Object> createTemplateDetails() { Map<Object, Object> details = new HashMap<>(); Map<Object, Object> innerMap = new HashMap<>(); innerMap.put("hypervisortoolsversion", "xenserver56"); details.put(0, innerMap); return details; }  @Scheduled(initialDelay = ONE_MINUTE_IN_MILLISECONDS, fixedDelay = ONE_MINUTE_IN_MILLISECONDS * NUMBER_OF_MINUTES_BETWEEN_REGISTRATION_OF_TEMPLATES) void registerTemplatesIfNeeded(); @Override void afterPropertiesSet();  }
@Test public void createTemplateDetailsTest() { Map<Object, Object> details = new HashMap<>(); Map<Object, Object> innerMap = new HashMap<>(); innerMap.put("hypervisortoolsversion", "xenserver56"); details.put(0, innerMap); Map<Object, Object> result = spy.createTemplateDetails(); Assert.assertEquals(details.get(0).toString(), result.get(0).toString()); }