@Override
    public Path writeFile(Path path, InputStream fileContentsInputStream) {
        try {
            ByteArrayOutputStream byteArrayStream = new ByteArrayOutputStream();
            byte[] buffer = new byte[8 * 1024];
            int numCharsRead;
            while ((numCharsRead = fileContentsInputStream.read(buffer, 0, buffer.length)) != -1) {
                byteArrayStream.write(buffer, 0, numCharsRead);
            }
            return storeFile(path, byteArrayStream.toByteArray());
        } catch (IOException e) {
            throw new SmithyBuildException("Unable to write contents of file `" + path + "`: " + e.getMessage(), e);
        }
    }
Creates a mock manifest that stores files in memory and uses a
base directory of "/".
smithy-build/src/main/java/software/amazon/smithy/build/MockManifest.java