@@ -0,0 +1,1603 @@
+package uk.gov.register.functional;%0A%0Aimport io.dropwizard.testing.ConfigOverride;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport uk.gov.register.functional.app.RegisterRule;%0A%0Aimport javax.ws.rs.core.Response;%0A%0Aimport static org.hamcrest.Matchers.empty;%0Aimport static org.hamcrest.Matchers.hasSize;%0Aimport static org.hamcrest.core.Is.is;%0Aimport static org.hamcrest.core.IsEqual.equalTo;%0Aimport static org.junit.Assert.assertThat;%0Aimport static uk.gov.register.functional.db.TestDBSupport.testEntryDAO;%0Aimport static uk.gov.register.functional.db.TestDBSupport.testItemDAO;%0A%0Apublic class DeleteRegisterDataFunctionalTest %7B%0A    @Rule%0A    public final RegisterRule register = new RegisterRule(%22register%22,%0A            ConfigOverride.config(%22enableRegisterDataDelete%22, %22true%22));%0A%0A    @Test%0A    public void deleteRegisterData_deletesAllDataFromDb() throws Exception %7B%0A        String item1 = %22%7B%5C%22register%5C%22:%5C%22register1%5C%22,%5C%22text%5C%22:%5C%22Register1 Text%5C%22, %5C%22phase%5C%22:%5C%22alpha%5C%22%7D%22;%0A        String item2 = %22%7B%5C%22register%5C%22:%5C%22register2%5C%22,%5C%22text%5C%22:%5C%22Register2 Text%5C%22, %5C%22phase%5C%22:%5C%22alpha%5C%22%7D%22;%0A%0A        Response mintResponse = register.mintLines(item1 + %22%5Cn%22 + item2);%0A        assertThat(mintResponse.getStatus(), equalTo(204));%0A        assertThat(testItemDAO.getItems(), hasSize(2));%0A        assertThat(testEntryDAO.getAllEntries(), hasSize(2));%0A%0A        Response deleteResponse = register.deleteRequest(%22/delete-register-data%22);%0A%0A        assertThat(deleteResponse.getStatus(), equalTo(200));%0A        assertThat(testItemDAO.getItems(), is(empty()));%0A        assertThat(testEntryDAO.getAllEntries(), is(empty()));%0A    %7D%0A%7D%0A

Test if data is really deleted after calling /delete-register-data endpoint