diff --git a/.gitattributes b/.gitattributes
index 236c02429a3398524b2f015924589143da33e274..c4dc6860b5bab9753c2bac0cb67d124267948e72 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2433,6 +2433,7 @@ MAC/APL/PIC/RSP_Driver/src/SetSwapxyCmd.h -text
 MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc -text
 MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h -text
 MAC/APL/PIC/RSP_Driver/src/rspctl.log_prop -text
+MAC/APL/PIC/RSP_Driver/src/rspctl_main.cc -text
 MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_1 -text
 MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_2 -text
 MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_3 -text
@@ -2446,6 +2447,7 @@ MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_4 -text
 MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_5 -text
 MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_6 -text
 MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_CableAtts -text
+MAC/APL/PIC/RSP_Driver/test/tRSPCtl.cc -text
 MAC/APL/PIC/RSP_Protocol/doc/package.dox -text
 MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h -text
 MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SDOMode.h -text
diff --git a/MAC/APL/PIC/RSP_Driver/CMakeLists.txt b/MAC/APL/PIC/RSP_Driver/CMakeLists.txt
index 9e1e876447b4f2e1f0ec62e68b837c6f3e8d3b2e..d13e6d337da1d583a8db19a97129a2b06bb1c5fe 100644
--- a/MAC/APL/PIC/RSP_Driver/CMakeLists.txt
+++ b/MAC/APL/PIC/RSP_Driver/CMakeLists.txt
@@ -6,6 +6,7 @@ lofar_package(RSP_Driver 6.0 DEPENDS ApplCommon Common TestSuite GCFTM MACIO RTC
 include(LofarFindPackage)
 lofar_find_package(Boost REQUIRED)
 lofar_find_package(Blitz REQUIRED)
+lofar_find_package(UnitTest++)
 
 add_subdirectory(src)
 add_subdirectory(test)
diff --git a/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt b/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt
index 55239b312398d59904f96973281a3d06a69ebf10..d89cff49f2db44db3ae5355701bf8ff3c28c054a 100644
--- a/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt
+++ b/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt
@@ -16,7 +16,7 @@ lofar_add_library(epa
 
 lofar_add_sbin_program(geni2c geni2c.cc)
 lofar_add_bin_program(versionrsp_driver versionrsp_driver.cc)
-lofar_add_bin_program(rspctl rspctl.cc)
+lofar_add_bin_program(rspctl rspctl.cc rspctl_main.cc)
 lofar_add_bin_program(RSPDriver
   RSPDriver.cc
   Scheduler.cc
diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
index 4be6294fe610930715bb2ef1404e03f95941d515..2dd1aa3899f459883c3829bf591a3bee257d978e 100644
--- a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
+++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc
@@ -206,26 +206,37 @@ void WeightsCommand::send()
 		setweights.rcumask   = getRCUMask();
 		logMessage(cerr,formatString("rcumask.count()=%d",setweights.rcumask.count()));
 
-        int nBanks = (MAX_BITS_PER_SAMPLE / itsBitsPerSample);
+		int nBanks = (MAX_BITS_PER_SAMPLE / itsBitsPerSample);
 		setweights.weights().resize(1, setweights.rcumask.count(), nBanks, maxBeamletsPerBank(itsBitsPerSample));
 
 		//bitset<maxBeamlets(bitsPerSample)> beamlet_mask = getBEAMLETSMask();
 		boost::dynamic_bitset<> beamlet_mask = getBEAMLETSMask(itsBitsPerSample);
 
 		// -1 < m_value <= 1
-		complex<double> value = m_value;
-		value *= (1<<14); // -.99999 should become -16383 and 1 should become 16384
 		setweights.weights() = itsWeights;
 		int rcunr = 0;
 		int max_beamlets = maxBeamlets(itsBitsPerSample);
+		bool multiple_values = (m_values.size() > 1);
 		for (int rcu = 0; rcu < MAX_RCUS; rcu++) {
 			if (setweights.rcumask.test(rcu)) {
+				std::list<complex<double>>::iterator itr = m_values.begin();
 				for (int beamlet = 0; beamlet < max_beamlets; beamlet++) {
 					if (beamlet_mask.test(beamlet)) {
-					    int plane = beamlet / maxBeamletsPerBank(itsBitsPerSample);
-						int beamletnr = beamlet % maxBeamletsPerBank(itsBitsPerSample);
-						setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>((int16)value.real(), (int16)value.imag());
-						//setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>(10+plane, beamletnr); // for testing
+                            			if(itr != m_values.end()) {
+							complex<double> value = *itr;
+							value *= (1<<14); // -.99999 should become -16383 and 1 should become 16384
+							int plane = beamlet / maxBeamletsPerBank(itsBitsPerSample);
+							int beamletnr = beamlet % maxBeamletsPerBank(itsBitsPerSample);
+							setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>((int16)value.real(), (int16)value.imag());
+							//setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>(10+plane, beamletnr); // for testing
+							if(multiple_values) { // advance value if we have multiple values otherwise use the single value for all beamlets
+								itr++;
+							}
+						}
+						else {
+							logMessage(cerr,formatString("Error: not enough complex numbers for the amount of beamlets"));
+							rspctl_exit_code = EXIT_FAILURE;
+						}
 					}
 				} // beamlet
 				rcunr++;
@@ -3301,6 +3312,22 @@ GCFEvent::TResult LatencyCommand::ack(GCFEvent& e)
 	return GCFEvent::HANDLED;
 }
 
+TestableRSPCtl::TestableRSPCtl(string name, int argc, char** argv) :
+    RSPCtl(name, argc, argv),
+	m_argc           (argc),
+	m_argv           (argv)
+{
+}
+
+TestableRSPCtl::~TestableRSPCtl()
+{
+}
+
+Command* TestableRSPCtl::getCommand()
+{
+    return parse_options(m_argc, m_argv);
+}
+
 //
 // RSPCtl()
 //
@@ -3334,6 +3361,11 @@ RSPCtl::~RSPCtl()
 		delete itsCommand;
 }
 
+int RSPCtl::getExitCode()
+{
+	return rspctl_exit_code;
+}
+
 //
 // initial(event, port)
 //
@@ -3855,6 +3887,8 @@ static void usage(bool exportMode)
 	cout << "rspctl --weights                    [--select=<set>]  # get weights as complex values" << endl;
 	cout << "  Example --weights --select=1,2,4:7 or --select=1:3,5:7" << endl;
 	cout << "rspctl --weights=value.re[,value.im][--select=<set>][--beamlets=<set>] # set weights as complex value" << endl;
+	cout << "OR     --weights=\"(value.re,value.im)(value.re,value.im)\" [--select=<set>][--beamlets=<set>] # set multiple weights" << endl;
+    cout << "   as complex value for the same amount of selected beamlets" << endl;
 	cout << "rspctl --aweights                   [--select=<set>]  # get weights as power and angle (in degrees)" << endl;
 	cout << "rspctl --aweights=amplitude[,angle] [--select=<set>]  # set weights as amplitude and angle (in degrees)" << endl;
 	cout << "rspctl --subbands                   [--select=<set>]  # get subband selection" << endl;
@@ -4013,7 +4047,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 	   				rspctl_exit_code = EXIT_FAILURE;
 					exit(EXIT_FAILURE);
 				}
-				select = strtolist(optarg, command->get_ndevices());
+				select = utility::strtolist(optarg, command->get_ndevices());
 				if (select.empty()) {
 					logMessage(cerr,"Error: invalid or missing '--select' option");
 	   				rspctl_exit_code = EXIT_FAILURE;
@@ -4033,7 +4067,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 	   				rspctl_exit_code = EXIT_FAILURE;
 					exit(EXIT_FAILURE);
 				}
-				beamlets = strtolist(optarg, maxBeamlets(itsNbitsPerSample));
+				beamlets = utility::strtolist(optarg, maxBeamlets(itsNbitsPerSample));
 				if (beamlets.empty()) {
 					logMessage(cerr,"Error: invalid or missing '--beamlets' option");
 	   				rspctl_exit_code = EXIT_FAILURE;
@@ -4058,15 +4092,28 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 
 			if (optarg) {
 				weightscommand->setMode(false);
-				double re = 0.0, im = 0.0;
-				int numitems = sscanf(optarg, "%lf,%lf", &re, &im);
-				if (numitems == 0 || numitems == EOF) {
-					logMessage(cerr,"Error: invalid weights value. Should be of the format "
-					"'--weights=value.re[,value.im]' where value is a floating point value in the range (-1,1].");
-	   				rspctl_exit_code = EXIT_FAILURE;
-					exit(EXIT_FAILURE);
-				}
-				weightscommand->setValue(complex<double>(re,im));
+                std::list<std::complex<double>> weights;
+
+                if(optarg[0] == '(') {
+                     weights = utility::strtocomplexlist(optarg);
+                     if (weights.empty()) {
+                         logMessage(cerr,"Error: invalid or missing '--weights' option");
+                         rspctl_exit_code = EXIT_FAILURE;
+                         exit(EXIT_FAILURE);
+                     }
+                }
+                else {
+                    double re = 0.0, im = 0.0;
+                    int numitems = sscanf(optarg, "%lf,%lf", &re, &im);
+                    if (numitems == 0 || numitems == EOF) {
+                        logMessage(cerr,"Error: invalid weights value. Should be of the format "
+                                   "'--weights=value.re[,value.im]' where value is a floating point value in the range (-1,1].");
+                        rspctl_exit_code = EXIT_FAILURE;
+                        exit(EXIT_FAILURE);
+                    }
+                    weights.push_back(complex<double>(re,im));
+                }
+				weightscommand->setValues(weights);
 			}
 		}
 		break;
@@ -4099,7 +4146,9 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 				}
 
 				//weightscommand->setValue(complex<double>(amplitude * ::cos(angle), amplitude * ::sin(angle)));
-				weightscommand->setValue(amplitude * exp(complex<double>(0,angle / 180.0 * M_PI)));
+                std::list<std::complex<double>> weights;
+                weights.push_back(amplitude * exp(complex<double>(0,angle / 180.0 * M_PI)));
+				weightscommand->setValues(weights);
 			}
 		}
 		break;
@@ -4116,7 +4165,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 
 			if (optarg) {
 				subbandscommand->setMode(false);
-				list<int> subbandlist = strtolist(optarg, MAX_SUBBANDS);
+				list<int> subbandlist = utility::strtolist(optarg, MAX_SUBBANDS);
 				if (subbandlist.empty()) {
 					logMessage(cerr,"Error: invalid or empty '--subbands' option");
 	   				rspctl_exit_code = EXIT_FAILURE;
@@ -4419,7 +4468,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 
 			if (optarg) {
 				sdocommand->setMode(false);
-				list<int> subbandlist = strtolist(optarg, MAX_SUBBANDS);
+				list<int> subbandlist = utility::strtolist(optarg, MAX_SUBBANDS);
 				if (subbandlist.empty()) {
 					logMessage(cerr,"Error: invalid or empty '--sdo' option");
 	   				rspctl_exit_code = EXIT_FAILURE;
@@ -4600,7 +4649,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 
 			if (optarg) {
 				hbacommand->setMode(false); // set the HBA delays
-				hbacommand->setDelayList(strtolist(optarg, (uint8)-1));
+				hbacommand->setDelayList(utility::strtolist(optarg, (uint8)-1));
 			}
 		}
 		break;
@@ -4624,7 +4673,7 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 					char* liststring = strchr(optarg, ',');
 					liststring++; // skip the ,
 					if (liststring && *liststring) {
-						list<int> subbandlist = strtolist(liststring, MAX_SUBBANDS);
+                        list<int> subbandlist = utility::strtolist(liststring, MAX_SUBBANDS);
 						if (subbandlist.empty()) {
 							logMessage(cerr,"Error: missing or invalid subband set '--tbbmode=subbands' option");
 	   						rspctl_exit_code = EXIT_FAILURE;
@@ -4900,7 +4949,66 @@ Command* RSPCtl::parse_options(int argc, char** argv)
 	return (command);
 }
 
-std::list<int> RSPCtl::strtolist(const char* str, int max)
+void utility::logMessage(ostream& stream, const string& message) {
+  stream << message << endl;
+}
+
+std::list<complex<double>> utility::strtocomplexlist(const char* str)
+{
+  std::string input_string(str);
+  list<complex<double>> result;
+
+  char*  start  = (char*)input_string.c_str();
+  char*  end    = 0;
+  bool   pair   = false;
+  bool   img    = false;
+  double first  = 0;
+  double second = 0;
+
+  while(start) {
+    double val = strtod(start, &end); // read decimal numbers
+	start = (end ? (*end ? end + 1 : 0) : 0); // advance
+    if(end) {
+      switch(*end) {
+      case 0:
+        break;
+      case ',':
+        if(pair) {
+          first = val;
+          img = true;
+        }
+        break;
+      case '(':
+        pair = true;
+        break;
+      case ')':
+        if(img) {
+            second = val;
+        }
+        else {
+          first = val;
+        }
+        
+        result.push_back(std::complex<double>(first, second));
+        pair = false;
+        img = false;
+        first = 0;
+        second = 0;
+        break;
+      default:
+        logMessage(cerr,formatString("Error: invalid character %c",*end));
+        rspctl_exit_code = EXIT_FAILURE;
+        result.clear();
+        return result;
+        break;
+      } // switch
+    } // if (end)
+  }
+  
+  return result;
+}
+
+std::list<int> utility::strtolist(const char* str, int max)
 {
 	string inputstring(str);
 	char* start  = (char*)inputstring.c_str();
@@ -4976,31 +5084,3 @@ void RSPCtl::logMessage(ostream& stream, const string& message)
 	} // namespace rspctl
 } // namespace LOFAR
 
-//)
-// MAIN
-//
-
-using namespace LOFAR;
-using namespace LOFAR::rspctl;
-
-int main(int argc, char** argv)
-{
-	GCFScheduler::instance()->init(argc, argv, "rspctl");
-
-	LOG_INFO(formatString("Program %s has started", argv[0]));
-
-	RSPCtl c("RSPCtl", argc, argv);
-
-	try {
-		c.start(); // make initial transition
-		GCFScheduler::instance()->run();
-	}
-	catch (Exception& e) {
-		cerr << "Exception: " << e.text() << endl;
-		exit(EXIT_FAILURE);
-	}
-
-	LOG_INFO("Normal termination of program");
-
-	return (rspctl_exit_code);
-}
diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.h b/MAC/APL/PIC/RSP_Driver/src/rspctl.h
index 54775cc3c33e22ea57b961d536262efa48d561f3..364f4f5f69a9004ac4f1be29acf9b587a679f984 100644
--- a/MAC/APL/PIC/RSP_Driver/src/rspctl.h
+++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.h
@@ -215,12 +215,15 @@ public:
 	virtual ~WeightsCommand() {}
 	virtual void send();
 	virtual GCFEvent::TResult ack(GCFEvent& e);
-	void setValue(std::complex<double> value) {
-		m_value = value;
+    void setValues(const std::list<std::complex<double>>& values) {
+		m_values = values;
 	}
 	void setType(int type) { m_type = type; }
+    std::list<std::complex<double>> getValues() {
+      return m_values;
+    }
 private:
-	std::complex<double>                    m_value;
+    std::list<std::complex<double>>         m_values;
 	int                                     m_type;
 	int                                     itsStage;
 	blitz::Array<std::complex<int16>, 4>    itsWeights;
@@ -807,6 +810,13 @@ public:
 	virtual GCFEvent::TResult ack(GCFEvent& e);
 };
 
+namespace utility
+{
+    void logMessage(ostream& stream, const string& message);
+    std::list<int> strtolist(const char* str, int max);
+    std::list<std::complex<double>> strtocomplexlist(const char* str);
+}
+
 // Controller class for rspctl
 //
 // class RSPCtl
@@ -841,21 +851,21 @@ public:
 	// In this state the command is sent and the acknowledge handled. Any relevant output is printed.
 	GCFEvent::TResult doCommand(GCFEvent& e, GCFPortInterface &p);
 
+	int getExitCode();
+
 	// Start the controller main loop.
 	void mainloop();
-
+protected:
+	// the command to execute
+	Command*        itsCommand;
+	Command* parse_options(int argc, char** argv);
 private:
 	// private methods
-	Command* parse_options(int argc, char** argv);
-	std::list<int> strtolist(const char* str, int max);
 	void logMessage(ostream& stream, const string& message);
 
 	// ports
 	GCFTCPPort*     itsRSPDriver;
 
-	// the command to execute
-	Command*        itsCommand;
-
 	// dimensions of the connected hardware
 	int             m_nrcus;
 	int             m_nrspboards;
@@ -878,6 +888,22 @@ private:
 	SubClockCommand m_subclock; // always subscribe to clock updates
 };
 
+class TestableRSPCtl : public RSPCtl
+{
+public:
+	// The constructor of the RSPCtl task.
+	// @param name The name of the task. The name is used for looking
+	// up connection establishment information using the GTMNameService and
+	// GTMTopologyService classes.
+	TestableRSPCtl(string name, int argc, char** argv);
+	virtual ~TestableRSPCtl();
+    Command* getCommand();
+private:
+  	// commandline parameters
+	int             m_argc;
+	char**          m_argv;
+};
+
   }; // namespace rspctl
 }; // namespace LOFAR
 
diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl_main.cc b/MAC/APL/PIC/RSP_Driver/src/rspctl_main.cc
new file mode 100644
index 0000000000000000000000000000000000000000..41e65563d51411f2de500b043977a7ed4372de84
--- /dev/null
+++ b/MAC/APL/PIC/RSP_Driver/src/rspctl_main.cc
@@ -0,0 +1,34 @@
+#include <lofar_config.h>
+#include <Common/LofarLogger.h>
+#include <Common/StringUtil.h>
+#include <Common/Exception.h>
+
+#include <GCF/TM/GCF_Scheduler.h>
+
+#include "rspctl.h"
+
+using namespace LOFAR;
+using namespace LOFAR::rspctl;
+using namespace LOFAR::GCF::TM;
+
+int main(int argc, char** argv)
+{
+	GCFScheduler::instance()->init(argc, argv, "rspctl");
+
+	LOG_INFO(formatString("Program %s has started", argv[0]));
+
+	RSPCtl c("RSPCtl", argc, argv);
+
+	try {
+		c.start(); // make initial transition
+		GCFScheduler::instance()->run();
+	}
+	catch (Exception& e) {
+		cerr << "Exception: " << e.text() << endl;
+		exit(EXIT_FAILURE);
+	}
+
+	LOG_INFO("Normal termination of program");
+
+	return (c.getExitCode());
+}
diff --git a/MAC/APL/PIC/RSP_Driver/test/CMakeLists.txt b/MAC/APL/PIC/RSP_Driver/test/CMakeLists.txt
index 63d8808e728e61b59e4590d8f28652a3feb091e2..51ee8711119d523e97584f82e21f23849fa833c1 100644
--- a/MAC/APL/PIC/RSP_Driver/test/CMakeLists.txt
+++ b/MAC/APL/PIC/RSP_Driver/test/CMakeLists.txt
@@ -5,6 +5,10 @@ include(LofarCTest)
 # Add project's source directory to -I path.
 include_directories(${PACKAGE_SOURCE_DIR}/src)
 
+lofar_add_test(tRSPCtl
+  tRSPCtl.cc
+  ${PACKAGE_SOURCE_DIR}/src/rspctl.cc)
+
 lofar_add_test(tCableAttenuation 
   tCableAttenuation.cc
   ${PACKAGE_SOURCE_DIR}/src/CableAttenuation.cc)
diff --git a/MAC/APL/PIC/RSP_Driver/test/tRSPCtl.cc b/MAC/APL/PIC/RSP_Driver/test/tRSPCtl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b163928574c20c33b5cb592a3bb832b66265b70c
--- /dev/null
+++ b/MAC/APL/PIC/RSP_Driver/test/tRSPCtl.cc
@@ -0,0 +1,92 @@
+#include <UnitTest++.h>
+#include <complex>
+#include <list>
+
+#include "rspctl.h"
+
+using namespace LOFAR::TYPES;
+using namespace LOFAR::rspctl;
+using namespace LOFAR::rspctl::utility;
+
+TEST(returns_empty_complex_list_with_empty_string)
+{
+  std::list<std::complex<double>> list(strtocomplexlist(""));
+  CHECK_EQUAL(0, list.size());
+}
+
+TEST(returns_list_contains_one_complex_number_when_string_has_a_pair_of_ints)
+{
+  std::list<std::complex<double>> list(strtocomplexlist("(0,0)"));
+  CHECK_EQUAL(1, list.size());
+}
+
+TEST(returns_list_contains_two_complex_numbers_when_string_has_two_pairs_of_ints)
+{
+  std::list<std::complex<double>> list(strtocomplexlist("(0,0),(1,1)"));
+  CHECK_EQUAL(2, list.size());
+}
+
+TEST(returns_list_contains_two_complex_numbers_when_string_has_two_pairs_of_ints_without_comma)
+{
+  std::list<std::complex<double>> list(strtocomplexlist("(0,0)(1,1)"));
+  CHECK_EQUAL(2, list.size());
+}
+
+TEST(returns_list_contains_correct_complex_number_when_string_has_a_pair_of_doubles)
+{
+  std::list<std::complex<double>> list(strtocomplexlist("(2.3,5.4)"));
+  std::complex<double> first_value = list.front();
+
+  CHECK_EQUAL(2.3, first_value.real());
+  CHECK_EQUAL(5.4, first_value.imag());
+}
+
+TEST(strtocomplexlist_contains_correct_complex_number_when_string_has_a_pair_with_only_a_real_number)
+{
+  std::list<std::complex<double>> list(strtocomplexlist("(2.3)"));
+  std::complex<double> first_value = list.front();
+
+  CHECK_EQUAL(2.3, first_value.real());
+  CHECK_EQUAL(0, first_value.imag());
+}
+
+/// Here argument parsing for the weights command gets tested. The rspctl
+/// expects argc and argv as arguments.
+///
+// getCommand only returns the created command based on the parsing
+// of the argv. It will be deleted by rspctl destructor.
+// This is a hack to be able to test the changed WeightsCommand and
+// its commandline arguments parsing. Ideally the GCFPort would have
+// been mocked out to check the correct behavior but that would have
+// taken too much time.
+
+TEST(rspctl_should_create_the_weightscommand_when_weights_option_is_given)
+{
+  char* argv[2];
+  argv[0] =  const_cast<char*>("rspctl");
+  argv[1] =  const_cast<char*>("--weights=(1,1)");
+  TestableRSPCtl rspctl("RSPCtl", 2, argv);
+
+  Command* command = rspctl.getCommand();
+  CHECK_EQUAL(true, (dynamic_cast<WeightsCommand*>(command) != NULL));
+}
+
+TEST(rspctl_should_set_weights_correctly_on_command)
+{
+  char* argv[2];
+  argv[0] = const_cast<char*>("rspctl");
+  argv[1] = const_cast<char*>("--weights=(0.2,0.1)");
+  TestableRSPCtl rspctl("RSPCtl", 2, argv);
+
+  Command* command = rspctl.getCommand();
+  WeightsCommand* weights_command = dynamic_cast<WeightsCommand*>(command);
+  std::list<std::complex<double>> values = weights_command->getValues();
+
+  CHECK_EQUAL(0.2, values.front().real());
+  CHECK_EQUAL(0.1, values.front().imag());
+}
+
+int main(int, const char *[])
+{
+   return UnitTest::RunAllTests();
+}