From 4ec71554a0ae1e94d990c84ff1d4237f869cf810 Mon Sep 17 00:00:00 2001 From: Peter Hormanns Date: Wed, 18 Jul 2012 12:51:07 +0000 Subject: [PATCH] search NullPoiner --- hsarback/test/de/hsadmin/remote/DomainTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 @@ public class DomainTest { try { Object execute = client.execute(MODULE + ".search", params); Object[] result = (Object[]) execute; - count = ((List)((Map) result[0]).get("domainsoptions")).size(); + assertEquals(result.length, 1); + Map domainMap = (Map) result[0]; + assertNotNull(domainMap); + List optsList = (List)domainMap.get("domainsoptions"); + assertNotNull(optsList); + count = optsList.size(); } catch (XmlRpcException e) { fail(e.getMessage()); }