	@Test
	public void given_OneOntology_When_AnIncorrectIdIsSentToDeleteOne_TheViewIsRedirectToSamePage() throws Exception {

		final Ontology ontology = ontologyCreator("ontologyId", "userOntology");

		final String sessionUserId = "userOntology";

		given(ontologyService.getOntologyById(ontology.getId(), sessionUserId)).willReturn(ontology);
		doThrow(new RuntimeException()).when(ontologyBusinessService).deleteOntology(ontology.getId(), sessionUserId);

		given(utils.getUserId()).willReturn(sessionUserId);
		given(utils.isAdministrator()).willReturn(false);

		mockMvc.perform(delete("/ontologies/" + ontology.getId()))
				.andExpect(redirectedUrl("/ontologies/update/" + ontology.getId()));
	}