# Type of request: This is a ...
[ ] bug report
[x] feature request

# Detailed description
As a Developer,
I want to be able to simulate BadDigest and InvalidDigest errors,
So that I can test the error handling logic

## Expected behavior
https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
BadDigest: The Content-MD5 you specified did not match what we received.
InvalidDigest: The Content-MD5 you specified is not valid.

## Actual behavior
localstack returns InvalidDigest when MD5 does not match payload.


self.assertTrue(re.match(expected, result))
        self.assertTrue(lambda_executors.Util.debug_java_port is not False)
    def test_java_options_with_configured_debug_port(self):
        expected = '.*transport=dt_socket,server=y,suspend=y,address=1234'
        result = self.prepare_java_opts('-Xmx512M -agentlib:jdwp=transport=dt_socket,server=y'
                                      ',suspend=y,address=1234')
        self.assertTrue(re.match(expected, result))
        self.assertEqual('1234', lambda_executors.Util.debug_java_port)
    def test_java_options_with_configured_debug_port_in_middle(self):
        expected = '.*transport=dt_socket,server=y,address=1234,suspend=y'
        result = self.prepare_java_opts('-Xmx512M -agentlib:jdwp=transport=dt_socket,server=y'
                                      ',address=1234,suspend=y')
        self.assertTrue(re.match(expected, result))
        self.assertEqual('1234', lambda_executors.Util.debug_java_port)
    def prepare_java_opts(self, java_opts):
        lambda_executors.config.LAMBDA_JAVA_OPTS = java_opts
        result = lambda_executors.Util.get_java_opts()
        return result
    def test_get_java_lib_folder_classpath(self):
        jar_file = os.path.join(new_tmp_dir(), 'foo.jar')
        save_file(jar_file, '')
        self.assertEquals('.:foo.jar', lambda_executors.Util.get_java_classpath(jar_file))
    def test_get_java_lib_folder_classpath_no_directories(self):
        base_dir = new_tmp_dir()
        jar_file = os.path.join(base_dir, 'foo.jar')
        save_file(jar_file, '')
        lib_file = os.path.join(base_dir, 'lib', 'lib.jar')
        mkdir(os.path.dirname(lib_file))
        save_file(lib_file, '')
        self.assertEquals('.:lib/lib.jar:foo.jar', lambda_executors.Util.get_java_classpath(jar_file))