@Test public void getDetails() throws IllegalArgumentException, IllegalAccessException { final CreateSecondaryStagingStoreCmd cmd = new CreateSecondaryStagingStoreCmd(); final HashMap<String, Map<String, String>> details = new HashMap<>(); final HashMap<String, String> kv = new HashMap<>(); kv.put("key", "TEST-KEY"); kv.put("value", "TEST-VALUE"); details.put("does not matter", kv); ApiCmdTestUtil.set(cmd, "details", details); final Map<String, String> detailsMap = cmd.getDetails(); Assert.assertNotNull(detailsMap); Assert.assertEquals(1, detailsMap.size()); Assert.assertTrue(detailsMap.containsKey("TEST-KEY")); Assert.assertEquals("TEST-VALUE", detailsMap.get("TEST-KEY")); }
public Map<String, String> getDetails() { Map<String, String> detailsMap = null; if (details != null && !details.isEmpty()) { detailsMap = new HashMap<>(); for (final Map<String, String> detail : details.values()) { detailsMap.put(detail.get("key"), detail.get("value")); } } return detailsMap; }
CreateSecondaryStagingStoreCmd extends BaseCmd { public Map<String, String> getDetails() { Map<String, String> detailsMap = null; if (details != null && !details.isEmpty()) { detailsMap = new HashMap<>(); for (final Map<String, String> detail : details.values()) { detailsMap.put(detail.get("key"), detail.get("value")); } } return detailsMap; } }
CreateSecondaryStagingStoreCmd extends BaseCmd { public Map<String, String> getDetails() { Map<String, String> detailsMap = null; if (details != null && !details.isEmpty()) { detailsMap = new HashMap<>(); for (final Map<String, String> detail : details.values()) { detailsMap.put(detail.get("key"), detail.get("value")); } } return detailsMap; }  }
CreateSecondaryStagingStoreCmd extends BaseCmd { public Map<String, String> getDetails() { Map<String, String> detailsMap = null; if (details != null && !details.isEmpty()) { detailsMap = new HashMap<>(); for (final Map<String, String> detail : details.values()) { detailsMap.put(detail.get("key"), detail.get("value")); } } return detailsMap; }  String getUrl(); Long getZoneId(); Map<String, String> getDetails(); String getScope(); String getProviderName(); @Override void execute(); @Override String getCommandName(); @Override long getEntityOwnerId(); }
CreateSecondaryStagingStoreCmd extends BaseCmd { public Map<String, String> getDetails() { Map<String, String> detailsMap = null; if (details != null && !details.isEmpty()) { detailsMap = new HashMap<>(); for (final Map<String, String> detail : details.values()) { detailsMap.put(detail.get("key"), detail.get("value")); } } return detailsMap; }  String getUrl(); Long getZoneId(); Map<String, String> getDetails(); String getScope(); String getProviderName(); @Override void execute(); @Override String getCommandName(); @Override long getEntityOwnerId(); static final Logger s_logger; }