// Path: cumulusrdf-web-module/src/main/java/edu/kit/aifb/cumulus/webapp/HttpProtocol.java
// public interface Methods {
// 	static final String PUT = "PUT", POST = "POST", DELETE = "DELETE", GET = "GET";
// }
// 
// Path: cumulusrdf-web-module/src/main/java/edu/kit/aifb/cumulus/webapp/HttpProtocol.java
// public interface Parameters {
// 
// 	static final String URI = "uri",
// 			S = "s",
// 			P = "p",
// 			O = "o",
// 			C = "c",
// 			S2 = "s2",
// 			P2 = "p2",
// 			O2 = "o2",
// 			C2 = "c2",
// 			ACCEPT = "accept",
// 			QUERY = "query",
// 			UPDATE = "update",
// 			BASE_URI = "base-uri",
// 			CONTENT_TYPE = "content-type";
// }


import static edu.kit.aifb.cumulus.WebTestUtils.EMPTY_STRINGS;
import static edu.kit.aifb.cumulus.WebTestUtils.SELECT_ALL_TRIPLES_PATTERN;
import static edu.kit.aifb.cumulus.WebTestUtils.buildResource;
import static edu.kit.aifb.cumulus.WebTestUtils.newTripleStore;
import static edu.kit.aifb.cumulus.WebTestUtils.numOfRes;
import static edu.kit.aifb.cumulus.WebTestUtils.randomString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.model.vocabulary.RDFS;
import edu.kit.aifb.cumulus.framework.Environment.ConfigParams;
import edu.kit.aifb.cumulus.webapp.HttpProtocol.Methods;
import edu.kit.aifb.cumulus.webapp.HttpProtocol.Parameters;
			_classUnderTest.doDelete(request, response);

			verify(response).setStatus(HttpServletResponse.SC_NOT_FOUND);

			final int howManyTriplesOnStoreAfterDeleting = numOfRes(TRIPLE_STORE.query(SELECT_ALL_TRIPLES_PATTERN));

			assertEquals(howManyTriplesOnStoreBeforeDeleting, howManyTriplesOnStoreAfterDeleting);
		}
	}

	/**
	 * Internal method used for testing several invalid input scenarios.
	 * 
	 * @param uri the URI (delete by entity).
	 * @param s the subject.
	 * @param p the predicate.
	 * @param o the object.
	 * @param c the context.
	 * 
	 * @throws Exception hopefully never, otherwise the test fails.
	 */
	private void internalDeleteWithInvalidInput(
			final String uri, 
			final String s, 
			final String p, 
			final String o, 
			final String c) throws Exception {

		final HttpServletResponse response = mock(HttpServletResponse.class);
		final HttpServletRequest request = mock(HttpServletRequest.class);
// Path: cumulusrdf-web-module/src/main/java/edu/kit/aifb/cumulus/webapp/HttpProtocol.java
// public interface Methods {
// 	static final String PUT = "PUT", POST = "POST", DELETE = "DELETE", GET = "GET";
// }
// 
// Path: cumulusrdf-web-module/src/main/java/edu/kit/aifb/cumulus/webapp/HttpProtocol.java
// public interface Parameters {
// 
// 	static final String URI = "uri",
// 			S = "s",
// 			P = "p",
// 			O = "o",
// 			C = "c",
// 			S2 = "s2",
// 			P2 = "p2",
// 			O2 = "o2",
// 			C2 = "c2",
// 			ACCEPT = "accept",
// 			QUERY = "query",
// 			UPDATE = "update",
// 			BASE_URI = "base-uri",
// 			CONTENT_TYPE = "content-type";
// }


// Path: cumulusrdf-web-module/src/test/java/edu/kit/aifb/cumulus/webapp/CRUDServletDeleteTest.java
import static edu.kit.aifb.cumulus.WebTestUtils.EMPTY_STRINGS;
import static edu.kit.aifb.cumulus.WebTestUtils.SELECT_ALL_TRIPLES_PATTERN;
import static edu.kit.aifb.cumulus.WebTestUtils.buildResource;
import static edu.kit.aifb.cumulus.WebTestUtils.newTripleStore;
import static edu.kit.aifb.cumulus.WebTestUtils.numOfRes;
import static edu.kit.aifb.cumulus.WebTestUtils.randomString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Arrays;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.junit.Test;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.model.vocabulary.RDFS;
import edu.kit.aifb.cumulus.framework.Environment.ConfigParams;
import edu.kit.aifb.cumulus.webapp.HttpProtocol.Methods;
import edu.kit.aifb.cumulus.webapp.HttpProtocol.Parameters;

			_classUnderTest.doDelete(request, response);

			verify(response).setStatus(HttpServletResponse.SC_NOT_FOUND);

			final int howManyTriplesOnStoreAfterDeleting = numOfRes(TRIPLE_STORE.query(SELECT_ALL_TRIPLES_PATTERN));

			assertEquals(howManyTriplesOnStoreBeforeDeleting, howManyTriplesOnStoreAfterDeleting);
		}
	}

	/**
	 * Internal method used for testing several invalid input scenarios.
	 * 
	 * @param uri the URI (delete by entity).
	 * @param s the subject.
	 * @param p the predicate.
	 * @param o the object.
	 * @param c the context.
	 * 
	 * @throws Exception hopefully never, otherwise the test fails.
	 */
	private void internalDeleteWithInvalidInput(
			final String uri, 
			final String s, 
			final String p, 
			final String o, 
			final String c) throws Exception {

		final HttpServletResponse response = mock(HttpServletResponse.class);
		final HttpServletRequest request = mock(HttpServletRequest.class);
		when(request.getParameter(Parameters.URI)).thenReturn(uri != null ? uri : null);