From 4ec71554a0ae1e94d990c84ff1d4237f869cf810 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Wed, 18 Jul 2012 14:51:07 +0200
Subject: [PATCH] search NullPoiner

---
 hsarback/test/de/hsadmin/remote/DomainTest.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/hsarback/test/de/hsadmin/remote/DomainTest.java b/hsarback/test/de/hsadmin/remote/DomainTest.java
index f965919..3823eb5 100644
--- a/hsarback/test/de/hsadmin/remote/DomainTest.java
+++ b/hsarback/test/de/hsadmin/remote/DomainTest.java
@@ -221,7 +221,12 @@
 		try {
 			Object execute = client.execute(MODULE + ".search", params);
 			Object[] result = (Object[]) execute;
-			count = ((List<?>)((Map<String, ?>) result[0]).get("domainsoptions")).size();
+			assertEquals(result.length, 1);
+			Map<String, ?> domainMap = (Map<String, ?>) result[0];
+			assertNotNull(domainMap);
+			List<?> optsList = (List<?>)domainMap.get("domainsoptions");
+			assertNotNull(optsList);
+			count = optsList.size();
 		} catch (XmlRpcException e) {
 			fail(e.getMessage());
 		}

--
Gitblit v1.9.3