-// @Test
-// public void exec() {
-// try {
-// assertEquals(user._exec(0, "add","del","reset","extend","clear", "rename", "create"),500);
-// } catch (CadiException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// } catch (APIException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// } catch (LocatorException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// }
-// }
+ @Test
+ public void testExec() throws APIException, LocatorException, CadiException, URISyntaxException {
+ Item value = mock(Item.class);
+ Locator.Item item = new Locator.Item() {
+ };
+ when(loc.best()).thenReturn(value);
+ URI uri = new URI("http://java.sun.com/j2se/1.3/");
+ when(loc.get(value)).thenReturn(uri);
+ SecuritySetter<HttpURLConnection> secSet = mock(SecuritySetter.class);
+ HRcli hcli = new HRcli(hman, uri, item, secSet);
+ String[] strArr = {"add","del","setTo","extend","add","del","setTo","extend"};
+ user._exec(0, strArr);
+
+ String[] strArr1 = {"del","setTo","extend","add","del","setTo","extend"};
+ user._exec(0, strArr1);
+
+ String[] strArr2 = {"setTo","extend","add","del","setTo","extend"};
+ user._exec(0, strArr2);
+
+ String[] strArr3 = {"extend","add","del","setTo","extend"};
+ user._exec(0, strArr3);
+
+ }