desc1.getProperties().put("the answer to live", 42);
desc1.getProperties().put("basic", "value");
desc1.setConnectorType("connectorType1");
desc1.setDomainType("domainType1");
String id = UUID.randomUUID().toString();
ConnectorConfiguration conf1 = new ConnectorConfiguration(id, desc1);
persist(conf1);
List<ConfigItem<ConnectorDescription>> loaded = service
.load(ImmutableMap.of(Constants.CONNECTOR_PERSISTENT_ID, id));
assertThat(loaded.size(), is(1));
ConnectorConfiguration conf = (ConnectorConfiguration) loaded.get(0);
assertEquals(conf.getConnectorId(), id);
ConnectorDescription loadedDesc = conf.getContent();
assertEquals("connectorType1", loadedDesc.getConnectorType());
assertEquals("domainType1", loadedDesc.getDomainType());
assertEquals(desc1.getAttributes(), loadedDesc.getAttributes());
assertEquals(42, loadedDesc.getProperties().get("the answer to live"));
assertEquals("value", loadedDesc.getProperties().get("basic"));