@@ -0,0 +1,2769 @@
+import static com.google.appengine.api.datastore.FetchOptions.Builder.withLimit;%0Aimport static org.junit.Assert.assertEquals;%0Aimport com.google.appengine.api.datastore.DatastoreService;%0Aimport com.google.appengine.api.datastore.DatastoreServiceFactory;%0Aimport com.google.appengine.api.datastore.Entity;%0Aimport com.google.appengine.api.datastore.EntityNotFoundException;%0Aimport com.google.appengine.api.datastore.Key;%0Aimport com.google.appengine.api.datastore.KeyFactory;%0Aimport com.google.appengine.api.datastore.Query;%0Aimport com.google.appengine.tools.development.testing.LocalDatastoreServiceTestConfig;%0Aimport com.google.appengine.tools.development.testing.LocalServiceTestHelper;%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Apublic class DataServletTests %7B%0A%0A  // Maximum eventual consistency.%0A  private final LocalServiceTestHelper helper =%0A      new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig()%0A          .setDefaultHighRepJobPolicyUnappliedJobPercentage(100));%0A%0A    @Before%0A    public void setUp() %7B%0A        helper.setUp();%0A    %7D%0A%0A    @After%0A    public void tearDown() %7B%0A        helper.tearDown();%0A    %7D%0A%0A    @Test%0A    public void EntitiesArePutInDatastore()%7B%0A        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();%0A        Entity dummy = new Entity(%22Dummy%22);%0A        ds.put(dummy);%0A        assertEquals(1, ds.prepare(new Query(%22Dummy%22)).countEntities(withLimit(10)));%0A  %7D%0A%0A    @Test%0A    public void EntitiesCanHaveParentsUsingKeys()%7B%0A        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();%0A        Entity dummyParent = new Entity(%22DummyParent%22);%0A        ds.put(dummyParent);%0A        Key dummyParentKey = dummyParent.getKey();%0A        Entity dummy = new Entity(%22Dummy%22, dummyParentKey);%0A        ds.put(dummy);%0A        Key queriedDummyParentKey = dummy.getParent();%0A        Entity queriedDummyParent; %0A        try %7B%0A            queriedDummyParent = ds.get(queriedDummyParentKey);%0A        %7D catch(EntityNotFoundException e)%7B%0A            fail(%22Entity not found in Database%22)%0A        %7D%0A        assertEquals(true, queriedDummyParent == dummyParent);%0A    %7D%0A    %0A    @Test%0A    public void EntityPropertiesArePutInDatastore()%7B%0A        DatastoreService ds = DatastoreServiceFactory.getDatastoreService();%0A        dummyString = %22Bananas%22;%0A        Entity dummy = new Entity(%22Dummy%22);%0A        dummy.setProperty(%22Fruit%22, dummyString);%0A        ds.put(dummy);%0A        Key dummyKey = dummy.getKey();%0A        Entity queriedDummy;%0A        try %7B%0A            queriedDummy = ds.get(dummyKey);%0A        %7D catch(EntityNotFoundException e)%7B%0A            fail(%22Entity not found in Database%22)%0A        %7D%0A        assertEquals(true, queriedDummy.getProperty(%22Fruit%22).toString().equals(dummyString));%0A    %7D%0A%7D

Add basic unit tests for datastore