@@ -0,0 +1,1607 @@
+/*%0A * Copyright (c) 2008-2016 MongoDB, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage org.mongodb.morphia.generics;%0A%0Aimport com.mongodb.BasicDBObject;%0Aimport org.bson.Document;%0Aimport org.bson.types.ObjectId;%0Aimport org.junit.Test;%0Aimport org.mongodb.morphia.TestBase;%0Aimport org.mongodb.morphia.annotations.Id;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Apublic class TestJavaLists extends TestBase %7B%0A    @Test%0A    public void jsonObjects() %7B%0A        getMorphia().map(JsonList.class);%0A        populate(new BasicDBObject(Document.parse(%22%7B%5C%22jsonObject%5C%22: %7B %5C%22array%5C%22: %5B%7B %5C%22foo%5C%22: %5C%22bar%5C%22 %7D%5D%7D,%7D%22)));%0A        populate(new BasicDBObject(Document.parse(%22%7B%5C%22jsonList%5C%22 : %5B 1, %5C%22string%5C%22, true, null %5D,%7D%22)));%0A        populate(new BasicDBObject(Document.parse(%22%7B%5C%22jsonList%5C%22 : %5B %7B  %5C%22foo%5C%22 : %5C%22bar%5C%22 %7D%5D,%7D%22)));%0A    %7D%0A%0A    private void populate(final BasicDBObject jsonObject) %7B%0A        getMorphia().fromDBObject(null, JsonList.class, jsonObject);%0A    %7D%0A%7D%0A%0Aclass JsonList %7B%0A    @Id%0A    private ObjectId id;%0A    private List%3CObject%3E jsonList;%0A    private Map%3CString, Object%3E jsonObject;%0A%7D

test case for #876