List<ValueType> valueTypeList = new ArrayList<ValueType>();
valueTypeList.add(valueType1);
valueTypeList.add(valueType2);
valueTypeList.add(valueType3);
ValueTypeDAO mockedValueTypeDAO = mock(ValueTypeDAO.class);
mappingAction.setValueTypeDAO(mockedValueTypeDAO);
when(mockedValueTypeDAO.findAll()).thenReturn(valueTypeList);
//Code for creating List<Mapping> & mock for it.
Mapping mapping = new Mapping();
ColumnAlias columnAlias1 = new ColumnAlias(mapping, valueType1,"columnFamily", "qualifier", "alias");
ColumnAlias columnAlias2 = new ColumnAlias(mapping, valueType1,"columnFamily", "qualifier", "alias");