Index: branches/GeneralizedQAP/UnitTests/ApproximateLocalSearchTest.cs
===================================================================
--- branches/GeneralizedQAP/UnitTests/ApproximateLocalSearchTest.cs	(revision 15512)
+++ branches/GeneralizedQAP/UnitTests/ApproximateLocalSearchTest.cs	(revision 15512)
@@ -0,0 +1,87 @@
+﻿using System.Linq;
+using System.Threading;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.IntegerVectorEncoding;
+using HeuristicLab.Problems.GeneralizedQuadraticAssignment;
+using HeuristicLab.Random;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace UnitTests {
+  [TestClass]
+  public class ApproximateLocalSearchTest {
+
+    [TestMethod]
+    public void ApproximateLocalSearchApplyTest() {
+      CollectionAssert.AreEqual(new[] { 0, 3, 4, 2, 2, 0, 4, 3, 2, 0 }, assignment.ToArray());
+
+      var evaluation = instance.Evaluate(assignment);
+      Assert.AreEqual(7177824, evaluation.FlowCosts);
+      Assert.AreEqual(45, evaluation.InstallationCosts);
+      Assert.AreEqual(0, evaluation.ExcessDemand);
+
+      var quality = new DoubleValue(instance.ToSingleObjective(evaluation));
+      Assert.AreEqual(27898616.781881168, quality.Value, 1e-9);
+
+      var evaluatedSolutions = new IntValue(0);
+      ApproximateLocalSearch.Apply(random, assignment, quality,
+        ref evaluation, new IntValue(10), new IntValue(1000), instance,
+        evaluatedSolutions, new PercentValue(0.5));
+      Assert.AreEqual(896, evaluatedSolutions.Value);
+      CollectionAssert.AreEqual(new[] { 2, 0, 0, 3, 3, 1, 0, 0, 2, 0 }, assignment.ToArray());
+      Assert.AreEqual(11733118.305768538, quality.Value, 1e-9);
+    }
+
+    private const int Equipments = 10, Locations = 5;
+    private static GQAPInstance instance;
+    private static IntegerVector assignment;
+    private static MersenneTwister random;
+    
+    [ClassInitialize()]
+    public static void MyClassInitialize(TestContext testContext) {
+      random = new MersenneTwister(42);
+      var symmetricDistances = new DoubleMatrix(Locations, Locations);
+      var symmetricWeights = new DoubleMatrix(Equipments, Equipments);
+      for (int i = 0; i < Equipments - 1; i++) {
+        for (int j = i + 1; j < Equipments; j++) {
+          symmetricWeights[i, j] = random.Next(Equipments * 100);
+          symmetricWeights[j, i] = symmetricWeights[i, j];
+        }
+      }
+      for (int i = 0; i < Locations - 1; i++) {
+        for (int j = i + 1; j < Locations; j++) {
+          symmetricDistances[i, j] = random.Next(Locations * 100);
+          symmetricDistances[j, i] = symmetricDistances[i, j];
+        }
+      }
+      var installationCosts = new DoubleMatrix(Equipments, Locations);
+      for (int i = 0; i < Equipments; i++) {
+        for (int j = 0; j < Locations; j++) {
+          installationCosts[i, j] = random.Next(0, 10);
+        }
+      }
+      var demands = new DoubleArray(Equipments);
+      for (int i = 0; i < Equipments; i++) {
+        demands[i] = random.Next(1, 10);
+      }
+      var capacities = new DoubleArray(Locations);
+      for (int j = 0; j < Locations; j++) {
+        capacities[j] = random.Next(1, 10) * ((double)Equipments / (double)Locations) * 2;
+      }
+
+      var transportationCosts = random.NextDouble() * 10;
+      var overbookedCapacityPenalty = 1000 * random.NextDouble() + 100;
+
+      instance = new GQAPInstance() {
+        Capacities = capacities,
+        Demands = demands,
+        InstallationCosts = installationCosts,
+        PenaltyLevel = overbookedCapacityPenalty,
+        TransportationCosts = transportationCosts,
+        Weights = symmetricWeights,
+        Distances = symmetricDistances
+      };
+
+      assignment = GreedyRandomizedSolutionCreator.CreateSolution(random, instance, 100, false, CancellationToken.None);
+    }
+  }
+}
Index: branches/GeneralizedQAP/UnitTests/UnitTests.csproj
===================================================================
--- branches/GeneralizedQAP/UnitTests/UnitTests.csproj	(revision 15507)
+++ branches/GeneralizedQAP/UnitTests/UnitTests.csproj	(revision 15512)
@@ -109,4 +109,5 @@
     <Compile Include="GQAPNMoveEvaluatorTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="ApproximateLocalSearchTest.cs" />
   </ItemGroup>
   <ItemGroup>
