class DefaultExecutionContextSerializer implements ExecutionContextSerializer {

	/**
	 * Serializes an execution context to the provided {@link OutputStream}. The stream is
	 * not closed prior to it's return.
	 * @param context {@link Map} contents of the {@code ExecutionContext}.
	 * @param out {@link OutputStream} where the serialized context information will be
	 * written.
	 */
	@Override
	public void serialize(Map<String, Object> context, OutputStream out) throws IOException {<FILL_FUNCTION_BODY>}

	/**
	 * Deserializes an execution context from the provided {@link InputStream}.
	 * @param inputStream {@link InputStream} containing the information to be
	 * deserialized.
	 * @return the object serialized in the provided {@link InputStream}
	 */
	@SuppressWarnings("unchecked")
	@Override
	public Map<String, Object> deserialize(InputStream inputStream) throws IOException {
		var decodingStream = Base64.getDecoder().wrap(inputStream);
		try {
			var objectInputStream = new ObjectInputStream(decodingStream);
			return (Map<String, Object>) objectInputStream.readObject();
		}
		catch (IOException ex) {
			throw new IllegalArgumentException("Failed to deserialize object", ex);
		}
		catch (ClassNotFoundException ex) {
			throw new IllegalStateException("Failed to deserialize object type", ex);
		}
	}

}

		Assert.notNull(context, "context is required");
		Assert.notNull(out, "OutputStream is required");

		for (Object value : context.values()) {
			Assert.notNull(value, "A null value was found");
			if (!(value instanceof Serializable)) {
				throw new IllegalArgumentException(
						"Value: [" + value + "] must be serializable. " + "Object of class: ["
								+ value.getClass().getName() + "] must be an instance of " + Serializable.class);
			}
		}
		var byteArrayOutputStream = new ByteArrayOutputStream(1024);
		var encodingStream = Base64.getEncoder().wrap(byteArrayOutputStream);
		try (var objectOutputStream = new ObjectOutputStream(encodingStream)) {
			objectOutputStream.writeObject(context);
		}
		out.write(byteArrayOutputStream.toByteArray());
	
<no_super_class>