diff --git a/solventmapcreator/io/solvationenergyextraction.py b/solventmapcreator/io/solvationenergyextraction.py
index 1ee7f8ab5551efb63032668dc11a78af9644c6b5..0291cc8086217bf3a19b80c568ae7ad144c58230 100644
--- a/solventmapcreator/io/solvationenergyextraction.py
+++ b/solventmapcreator/io/solvationenergyextraction.py
@@ -29,7 +29,7 @@ def read_in_solvent_id_list(solvent_filename):
 def get_solvent_id_list(solvent_list_element_tree):
     """This gets the solventIDs from the solvent list.
     """
-    xpath_expression = "phase:SolventList/phase:Solvents/phase:Solvent/@phase:solventID"
+    xpath_expression = "/phase:SolventList/phase:Solvents/phase:Solvent/@phase:solventID"
     solvent_ids = solvent_list_element_tree.xpath(xpath_expression,
                                                   namespaces=PHASE_NAMESPACE_DICT)
     LOGGER.info("Solvent IDs found %i", len(solvent_ids))
diff --git a/solventmapcreator/test/iotest/solvationenergyextractiontest.py b/solventmapcreator/test/iotest/solvationenergyextractiontest.py
index 80e7c6adae18f5ac1097bccc6828b360a4f51159..0119d9bfc51d80c1eb3a7199217fa19f6a60de08 100644
--- a/solventmapcreator/test/iotest/solvationenergyextractiontest.py
+++ b/solventmapcreator/test/iotest/solvationenergyextractiontest.py
@@ -22,74 +22,191 @@ class SolvationEnergyExtractionTestCase(unittest.TestCase):
     def setUp(self):
         """Set up for tests
         """
+        self.solvent_filename = "resources/watersolvent.xml"
+        self.solvent_xml = solvationenergyextraction.read_xml_file(self.solvent_filename)
+        self.binding_energy_filename = "resources/energyvaluestest.xml"
+        self.free_energy_filename = "resources/energyvaluestest2.xml"
+        self.actual_output_filename = "resources/watersolvation.xml"
+        self.actual_output_filename2 = "water.xml"
+        self.actual_output_filename3 = "water.xml"
+        self.binding_energy_xml = solvationenergyextraction.read_xml_file(self.binding_energy_filename)
+        self.free_energy_xml = solvationenergyextraction.read_xml_file(self.free_energy_filename)
     def tearDown(self):
         """clean up after tests.
         """
+        del self.solvent_filename
+        del self.binding_energy_filename
+        del self.free_energy_filename
+        if os.path.isfile(self.actual_output_filename):
+            os.remove(self.actual_output_filename)
+        del self.actual_output_filename
+        if os.path.isfile(self.actual_output_filename2):
+            os.remove(self.actual_output_filename2)
+        del self.actual_output_filename2
+        if os.path.isfile(self.actual_output_filename3):
+            os.remove(self.actual_output_filename3)
+        del self.actual_output_filename3
+        
     def test_(self):
         """
         """
         self.fail("not implemented")
     def test_read_in_solvent_id_list(self):
+        """Test to see if expected solvent ID list is returned.
         """
-        """
-        self.fail("not implemented")
+        expected_solvent_list = ["water"]
+        actual_list = solvationenergyextraction.read_in_solvent_id_list(self.solvent_filename)
+        self.assertListEqual(expected_solvent_list, actual_list)
     def test_get_solvent_id_list(self):
+        """Test to see if expected solvent list is returned.
         """
-        """
-        self.fail("not implemented")
+        expected_solvent_list = ["water"]
+        actual_list = solvationenergyextraction.get_solvent_id_list(self.solvent_xml)
+        self.assertListEqual(expected_solvent_list, actual_list)
     def test_create_output_filename(self):
+        """Test to see if expected filename is produced.
         """
-        """
-        self.fail("not implemented")
+        expected_filename = "waterfree.xml"
+        actual_filename = solvationenergyextraction.create_output_filename("water", "free")
+        self.assertEqual(expected_filename, actual_filename)
     def test_write_element_tree_to_file(self):
-        """
+        """Test to see if expecetd file is written.
         """
         self.fail("not implemented")
     def test_create_element_tree(self):
+        """Test to see if expected element tree is produced.
         """
-        """
-        self.fail("not implemented")
+        expected_xml = """<phase:EnergyValues xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"/>
+"""
+        actual_element = solvationenergyextraction.create_element_tree(solvationenergyextraction.create_energy_values_element())
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_generate_energy_values_element(self):
-        """
-        """
-        self.fail("not implemented")
+        """Test to see if expected element is produced.
+        """
+        expected_xml = """<phase:EnergyValues xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema">
+  <phase:FreeEnergyCollection><phase:FreeEnergy phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+        <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:FreeEnergy>
+  </phase:FreeEnergyCollection>
+</phase:EnergyValues>
+"""
+        xpath_expression = solvationenergyextraction.generate_free_energy_xpath_expression("water")
+        free_elements = solvationenergyextraction.get_energy_elements(self.free_energy_xml,
+                                                                         xpath_expression)
+        actual_element = solvationenergyextraction.generate_energy_values_element(free_elements, "free")
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_generate_free_energy_collection(self):
-        """
-        """
-        self.fail("not implemented")
+        """Test to see if expected element is produced.
+        """
+        expected_xml = """<phase:FreeEnergyCollection xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"><phase:FreeEnergy phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+        <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:FreeEnergy>
+  </phase:FreeEnergyCollection>
+"""
+        xpath_expression = solvationenergyextraction.generate_free_energy_xpath_expression("water")
+        free_elements = solvationenergyextraction.get_energy_elements(self.free_energy_xml,
+                                                                         xpath_expression)
+        actual_element = solvationenergyextraction.generate_free_energy_collection(free_elements)
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_generate_binding_energy_collection(self):
-        """
-        """
-        self.fail("not implemented")
+        """Test to see if expected element is produced.
+        """
+        expected_xml = """<phase:BindingEnergyCollection xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"><phase:BindingEnergy phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+            <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:BindingEnergy>
+  </phase:BindingEnergyCollection>
+"""
+        xpath_expression = solvationenergyextraction.generate_binding_energy_xpath_expression("water")
+        binding_elements = solvationenergyextraction.get_energy_elements(self.binding_energy_xml,
+                                                                        xpath_expression)
+        actual_element = solvationenergyextraction.generate_binding_energy_collection(binding_elements)
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_append_energies_to_collection(self):
-        """
-        """
-        self.fail("not implemented")
+        """Test to see if expected element is produced.
+        """
+        expected_xml = """<phase:BindingEnergyCollection xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"><phase:BindingEnergy phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+            <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:BindingEnergy>
+  </phase:BindingEnergyCollection>
+"""
+        actual_element = solvationenergyextraction.create_binding_energy_collection_element()
+        xpath_expression = solvationenergyextraction.generate_binding_energy_xpath_expression("water")
+        binding_elements = solvationenergyextraction.get_energy_elements(self.binding_energy_xml,
+                                                                        xpath_expression)
+        solvationenergyextraction.append_energies_to_collection(actual_element, binding_elements)
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_create_energy_values_element(self):
+        """Test to see if expected element is produced.
         """
-        """
-        self.fail("not implemented")
+        expected_xml = """<phase:EnergyValues xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"/>
+"""
+        actual_element = solvationenergyextraction.create_energy_values_element()
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_create_free_energy_collection_element(self):
+        """Test to see if expected element is produced.
         """
-        """
-        self.fail("not implemented")
+        expected_xml = """<phase:FreeEnergyCollection xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"/>
+"""
+        actual_element = solvationenergyextraction.create_free_energy_collection_element()
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_create_binding_energy_collection_element(self):
+        """Test to see if expected element is produced.
         """
-        """
-        self.fail("not implemented")
+        expected_xml = """<phase:BindingEnergyCollection xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema"/>
+"""
+        actual_element = solvationenergyextraction.create_binding_energy_collection_element()
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_element, pretty_print=True))
     def test_get_energy_elements(self):
-        """
-        """
-        self.fail("not implemented")
+        """Test to see if expected energy elements are returned.
+        """
+        expected_xml = """<phase:BindingEnergy xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema" phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+            <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:BindingEnergy>
+  
+"""
+        xpath_expression = solvationenergyextraction.generate_binding_energy_xpath_expression("water")
+        actual_elements = solvationenergyextraction.get_energy_elements(self.binding_energy_xml,
+                                                                        xpath_expression)
+        self.assertEqual(1, len(actual_elements))
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(actual_elements[0], pretty_print=True))
     def test_generate_free_energy_xpath_expression(self):
+        """Test to see if expected XPath expression created.
         """
-        """
-        self.fail("not implemented")
+        expected_xpath_expression = "/phase:EnergyValues/phase:FreeEnergyCollection/phase:FreeEnergy[@phase:fromSolventID=''][@phase:toSolventID='water']"
+        actual_xpath_expression = solvationenergyextraction.generate_free_energy_xpath_expression("water")
+        self.assertEqual(expected_xpath_expression, actual_xpath_expression)
     def test_generate_binding_energy_xpath_expression(self):
+        """Test to see if expected XPath expression created.
         """
-        """
-        self.fail("not implemented")
+        expected_xpath_expression = "/phase:EnergyValues/phase:BindingEnergyCollection/phase:BindingEnergy[@phase:fromSolventID=''][@phase:toSolventID='water']"
+        actual_xpath_expression = solvationenergyextraction.generate_binding_energy_xpath_expression("water")
+        self.assertEqual(expected_xpath_expression, actual_xpath_expression)
     def test_read_xml_file(self):
-        """
-        """
-        self.fail("not implemented")
\ No newline at end of file
+        """Test to see if expected file is read.
+        """
+        expected_xml = """<phase:EnergyValues xmlns:phase="http://www-hunter.ch.cam.ac.uk/PhaseSchema">
+  <phase:BindingEnergyCollection><phase:BindingEnergy phase:moleculeID="-14.100solute" phase:fromSolventID="" phase:toSolventID="water" phase:valueType="MOLEFRACTION">
+            <phase:TotalEnergy>-34.8195308084233</phase:TotalEnergy>
+            <phase:EnergyContributions>
+                <phase:EnergyContribution phase:ssipID="1">-34.8195308084233</phase:EnergyContribution>
+            </phase:EnergyContributions>
+        </phase:BindingEnergy>
+  </phase:BindingEnergyCollection>
+</phase:EnergyValues>
+"""
+        self.assertMultiLineEqual(expected_xml, etree.tounicode(self.binding_energy_xml, pretty_print=True))
\ No newline at end of file
diff --git a/solventmapcreator/test/solvationmapcreatortests.py b/solventmapcreator/test/solvationmapcreatortests.py
index 1b714e102e86a2d586f541b0a81a741dcdc53ef4..9c30c93240153f629b75d3f9b374b713b560ac1d 100644
--- a/solventmapcreator/test/solvationmapcreatortests.py
+++ b/solventmapcreator/test/solvationmapcreatortests.py
@@ -16,6 +16,7 @@ from solventmapcreator.test.iotest.similaritymatrixwritertest import SimilarityM
 from solventmapcreator.test.iotest.similaritymatrixreadertest import SimilarityMatrixReaderTestCase
 from solventmapcreator.test.iotest.linkagewritertest import LinkageWriterTestCase
 from solventmapcreator.test.iotest.solvationmapwritertest import SolvationMapWriterTestCase
+from solventmapcreator.test.iotest.solvationenergyextractiontest import SolvationEnergyExtractionTestCase
 from solventmapcreator.test.solvationcalculationtest.solvationcalculatortest import SolvationCalculatorTestCase
 from solventmapcreator.test.solvationcalculationtest.solvationmapgeneratortest import SolvationMapGeneratorTestCase
 from solventmapcreator.test.solvationcalculationtest.solvationplotinformationtest import SolvationPlotInformationTestCase
@@ -35,7 +36,8 @@ LOGGER.setLevel(logging.WARN)
 IO_TEST_CASES = [SolvationEnergyReaderTestCase, SolventXMLReaderTestCase,
                  PolynomialDataWriterTestCase, PolynomialDataReaderTestCase,
                  SimilarityMatrixReaderTestCase, SimilarityMatrixWriterTestCase,
-                 LinkageWriterTestCase, SolvationMapWriterTestCase]
+                 LinkageWriterTestCase, SolvationMapWriterTestCase,
+                 SolvationEnergyExtractionTestCase]
 
 SOLVATION_CALCULATION_TEST_CASES = [SolvationCalculatorTestCase,
                                     SolvationMapGeneratorTestCase,