Added a unit test for PR
MODIFY
manager/api/es/pom.xml
manager/api/es/pom.xml
</dependency>
<!-- Third Party Libs -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<!-- Test Libs -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>test</scope>
- </dependency>
<dependency>
<artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId>

ADD
manager/test/api/src/test/java/io/apiman/manager/test/Apiman719Test.java
+/*
+ * Copyright 2014 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package io.apiman.manager.test;
+
+import org.junit.runner.RunWith;
+
+import io.apiman.manager.test.junit.ManagerRestTestPlan;
+import io.apiman.manager.test.junit.ManagerRestTester;
+
+/**
+ * Runs the test plan that reproduces https://github.com/apiman/apiman/pull/719
+ *
+ * @author eric.wittmann@redhat.com
+ */
+@RunWith(ManagerRestTester.class)
+@ManagerRestTestPlan("test-plans/apiman-719-testPlan.xml")
+public class Apiman719Test {
+}

ADD
manager/test/api/src/test/resources/test-plan-data/apiman-719/001_create-org.resttest
+POST /organizations admin/admin
+Content-Type: application/json
+
+{"name":"PlanOrg","description":""}
+----
+200
+Content-Type: application/json
+
+{
+ "name" : "PlanOrg",
+ "id" : "PlanOrg"
+}

ADD
manager/test/api/src/test/resources/test-plan-data/apiman-719/002_create-plan.resttest
+POST /organizations/PlanOrg/plans/ admin/admin
+Content-Type: application/json
+
+{"name":"Gold", "description":"", "initialVersion":"1.0"}
+----
+200
+Content-Type: application/json
+
+{
+ "organization" : {
+ "id" : "PlanOrg"
+ },
+ "id" : "Gold",
+ "name" : "Gold",
+ "createdBy" : "admin"
+}

ADD
manager/test/api/src/test/resources/test-plan-data/apiman-719/003_delete-plan.resttest
+DELETE /organizations/PlanOrg/plans/Gold admin/admin
+----
+204

ADD
manager/test/api/src/test/resources/test-plans/apiman-719-testPlan.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<testPlan xmlns="urn:io.apiman.test:2014:02:testPlan">
+
+ <testGroup name="Issue #719 Reproducer">
+ <test name="Create Org">test-plan-data/apiman-719/001_create-org.resttest</test>
+ <test name="Create Plan+Version">test-plan-data/apiman-719/002_create-plan.resttest</test>
+ <test name="Wait 1" delay="1000" />
+ <test name="Delete Plan">test-plan-data/apiman-719/003_delete-plan.resttest</test>
+ <test name="Wait 2" delay="1000" />
+ <test name="Create Plan+Version (Again)">test-plan-data/apiman-719/002_create-plan.resttest</test>
+ </testGroup>
+
+</testPlan>

Added a unit test for PR #719

Signed-off-by: Eric Wittmann <eric.wittmann@gmail.com>