def METHOD_NAME(self):
    with self.assertRaises(TypeError) as cm:
        writer = NEXUSDataWriter(file_name='test_file_name.nxs')
        writer.write()
    self.assertEqual(str(cm.exception), 'Data to write out must be set.')