class SplitCaseFilesAPIController {

    @RequestMapping(method = RequestMethod.POST, produces = { MediaType.APPLICATION_JSON_VALUE, MediaType.TEXT_XML_VALUE })
    @ResponseBody
    public CaseFile splitCaseFiles(
            @RequestBody SplitCaseOptions splitCaseOptions,
            HttpSession session,
            Authentication auth) throws MuleException, AcmCreateObjectFailedException, AcmUserActionFailedException, SplitCaseFileException,
            AcmFolderException, AcmObjectNotFoundException, PipelineProcessException
    {

        Objects.requireNonNull(splitCaseOptions.getCaseFileId(), "Case file for splitting should not be null");
        String ipAddress = (String) session.getAttribute("acm_ip_address");
        CaseFile copyCaseFile = splitCaseService.splitCase(auth, ipAddress, splitCaseOptions);
        return copyCaseFile;
    }

}