### Question:
SubmissionFormServiceImpl extends ServiceProxy implements SubmissionFormService { @Override public void deleteSubmissionFormTemplate(String templateId) { SubmissionFormTemplate existing = getPersistenceService().findById(SubmissionFormTemplate.class, templateId); if (existing != null) { getPersistenceService().delete(existing); } } SubmissionFormServiceImpl();  SubmissionFormServiceImpl(PersistenceService persistenceService); void setMappingController(MappingController mappingController); @Override SubmissionFormTemplate saveSubmissionFormTemplate(SubmissionFormTemplate template); @Override void saveSubmissionTemplateAsDefault(SubmissionFormTemplate template); @Override void deleteSubmissionFormTemplate(String templateId); @Override ValidationResult validateTemplate(SubmissionFormTemplate template, String componentType); @Override List<UserSubmission> getUserSubmissions(String ownerUsername); @Override UserSubmission saveUserSubmission(UserSubmission userSubmission); @Override UserSubmissionMedia saveSubmissionFormMedia(String userSubmissionId, String templateFieldId, MediaFile mediaFile, InputStream in); @Override VerifySubmissionTemplateResult verifySubmission(UserSubmission userSubmission); @Override ValidationResult submitUserSubmissionForApproval(UserSubmission userSubmission); @Override UserSubmission editComponentForSubmission(String componentId, EditSubmissionOptions options); @Override UserSubmission componentToSubmission(String componentId); @Override ValidationResult submitChangeRequestForApproval(UserSubmission userSubmission); @Override void reassignUserSubmission(String userSubmissionId, String newOwnerUsername); @Override void deleteUserSubmission(String userSubmissionId); @Override void deleteUserSubmissionMedia(String submissionMediaId); @Override void toggleActiveStatus(String submissionTemplateId, String newStatus); @Override SubmissionFormTemplate findTemplateForComponentType(String componentType); @Override void saveUserSubmissionComment(UserSubmissionComment userSubmissionComment);  }### Answer:
@Test public void testDeleteSubmissionFormTemplate() { System.out.println("deleteSubmissionFormTemplate - no resources"); String templateId = "1"; SubmissionFormTemplate template = new SubmissionFormTemplate(); template.setName("Test"); template.setDescription("This is a test"); PersistenceService persistenceService = Mockito.mock(PersistenceService.class); Mockito.when(persistenceService.findById(SubmissionFormTemplate.class, "1")).thenReturn(template); Mockito.when(persistenceService.queryByExample(Mockito.any(BaseEntity.class))).thenReturn(new ArrayList<>()); Service testService = Mockito.mock(Service.class); Mockito.when(testService.getPersistenceService()).thenReturn(persistenceService); ServiceProxyFactory.setTestService(testService); SubmissionFormServiceImpl instance = new SubmissionFormServiceImpl(persistenceService); instance.deleteSubmissionFormTemplate(templateId); }