# 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.


with self.app.test_request_context():
            self._create_function(self.FUNCTION_NAME, tags=self.TAGS)
            arn = lambda_api.func_arn(self.FUNCTION_NAME)
            response = self.client.get('{0}/tags/{1}'.format(lambda_api.PATH_ROOT, arn))
            result = json.loads(response.get_data())
            self.assertTrue('Tags' in result)
            self.assertDictEqual(self.TAGS, result['Tags'])
            self.client.delete('{0}/tags/{1}'.format(lambda_api.PATH_ROOT, arn), query_string={'tagKeys': 'env'})
            response = self.client.get('{0}/tags/{1}'.format(lambda_api.PATH_ROOT, arn))
            result = json.loads(response.get_data())
            self.assertTrue('Tags' in result)
            self.assertDictEqual({'hello': 'world'}, result['Tags'])
    def test_java_options_empty_return_empty_value(self):
        lambda_executors.config.LAMBDA_JAVA_OPTS = ''
        result = lambda_executors.Util.get_java_opts()
        self.assertFalse(result)
    def test_java_options_with_only_memory_options(self):
        expected = '-Xmx512M'
        result = self.prepare_java_opts(expected)
        self.assertEqual(expected, result)
    def test_java_options_with_memory_options_and_agentlib_option(self):
        expected = '.*transport=dt_socket,server=y,suspend=y,address=[0-9]+'
        result = self.prepare_java_opts('-Xmx512M -agentlib:jdwp=transport=dt_socket,server=y'
                                      ',suspend=y,address=_debug_port_')
        self.assertTrue(re.match(expected, result))
        self.assertTrue(lambda_executors.Util.debug_java_port is not False)
    def test_java_options_with_unset_debug_port_in_middle(self):
        expected = '.*transport=dt_socket,server=y,address=[0-9]+,suspend=y'
        result = self.prepare_java_opts('-Xmx512M -agentlib:jdwp=transport=dt_socket,server=y'
                                      ',address=_debug_port_,suspend=y')