@Test
public void testThatUpdatingExistingAliasWorks() {

	String aliasId = "foo";
	String existingTemplateId = "bar";
	String newTemplateId = "baz";
	
	Alias existingAlias = new Alias();
	existingAlias.setId(aliasId);
	existingAlias.setItemId(existingTemplateId);
	Alias updatedAlias = new Alias();
	updatedAlias.setId(aliasId);
	updatedAlias.setItemId(newTemplateId);
	
	//simulate record being present in DB
	when(mockAliasMan.load(aliasId)).thenReturn(existingAlias);
	
	String aliasOriginalTemplateId = instance.updateStormAlias(aliasId, mockAliasMan, newTemplateId);
	assertEquals(existingTemplateId, aliasOriginalTemplateId);
	
	verify(mockAliasMan).update(eq(updatedAlias));
	verify(mockAliasMan, never()).save(any());
}