@@ -0,0 +1,1388 @@
+package com.google.android.libraries.motionphotoreader;%0A%0Aimport com.adobe.internal.xmp.XMPException;%0Aimport com.adobe.internal.xmp.XMPMeta;%0Aimport com.google.common.primitives.Bytes;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.io.IOException;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class XmpParserTest %7B%0A    private static final byte%5B%5D OPEN_ARR = %22%3Cx:xmpmeta%22.getBytes();  /* Start of XMP metadata tag */%0A    private static final byte%5B%5D CLOSE_ARR = %22%3C/x:xmpmeta%3E%22.getBytes();  /* End of XMP metadata tag */%0A%0A    private String filename;%0A%0A    @Before%0A    public void setUp() %7B%0A        this.filename = this.getClass().getClassLoader().getResource(%22test_photo.jpg%22).getFile();%0A    %7D%0A%0A    @Test%0A    public void getXmpMetadata_isNotNull() throws IOException, XMPException %7B%0A        XMPMeta meta = XmpParser.getXmpMetadata(filename);%0A        assertNotNull(meta);%0A    %7D%0A%0A    @Test%0A    public void getXmpByteArray_hasCorrectHeader() throws IOException %7B%0A        byte%5B%5D segArr = XmpParser.getXmpByteArray(filename);%0A        int index = Bytes.indexOf(segArr, OPEN_ARR);%0A        assertEquals(0, index);%0A    %7D%0A%0A    @Test%0A    public void getXmpByteArray_hasCorrectFooter() throws IOException %7B%0A        byte%5B%5D segArr = XmpParser.getXmpByteArray(filename);%0A        int index = Bytes.indexOf(segArr, CLOSE_ARR);%0A        assertEquals(segArr.length, index + CLOSE_ARR.length);%0A    %7D%0A%7D

Add unit tests for XmpParser class.