def METHOD_NAME(self, mock_os_path_getsize):
    mock_os_path_getsize.return_value = 8192
    metadata_file = Mock()
    self.veritysetup.verification_metadata_file = metadata_file
    with raises(KiwiOffsetError):
        self.veritysetup.write_verification_metadata('/some/device')