### Question:
Entry implements Comparable<Entry>, CacheRMResource { Entry(String location, int cpuVCores, int memoryMbs) { id = null; cachedOn = 0; rmResourceId = null; this.location = location; this.cpuVCores = cpuVCores; this.memoryMbs = memoryMbs; rmData = null; } Entry(String location, int cpuVCores, int memoryMbs); private  Entry(UUID id, Object rmResourceId, Map<String, Object> rmData,
      String location, int cpuVCores, int memoryMbs); static Entry createStoreEntry(RMResource resource); static Entry createCacheEntry(RMResource resource); static Entry createCacheEntry(RMEvent rmEvent); @Override int compareTo(Entry o); @Override UUID getResourceId(); @Override long getCachedOn(); @Override Object getRmResourceId(); @Override Locality getLocalityAsk(); @Override String getLocationAsk(); @Override int getCpuVCoresAsk(); @Override int getMemoryMbsAsk(); @Override String getLocation(); @Override int getCpuVCores(); @Override int getMemoryMbs(); @Override Map<String, Object> getRmData(); @Override void setRmResourceId(Object rmResourceId); boolean isValid(); @Override String toString();  }### Answer:
@Test public void testEntry() throws Exception { manualClock.set(1000l); Resource resource = TestUtils.createResource("l1", Resource.Locality.MUST, 1, 1024); PlacedResourceImpl placedResource = TestUtils.createPlacedResourceImpl(resource); placedResource.setAllocationInfo("l11", 2, 2048); placedResource.setRmResourceId("rm11"); Entry entry1 = Entry.createCacheEntry(placedResource); Assert.assertNotNull(entry1.toString()); Assert.assertFalse(entry1.isValid()); entry1.setValid(true); Assert.assertTrue(entry1.isValid()); Assert.assertNotNull(entry1.getResourceId()); Assert.assertEquals(1000l, entry1.getCachedOn()); Assert.assertEquals("l11", entry1.getLocation()); Assert.assertEquals("rm11", entry1.getRmResourceId()); Assert.assertEquals(2, entry1.getCpuVCores()); Assert.assertEquals(2048, entry1.getMemoryMbs()); placedResource.setAllocationInfo("l22", 2, 2048); placedResource.setRmResourceId("rm22"); Entry entry2 = Entry.createCacheEntry(placedResource); Assert.assertTrue(entry1.compareTo(entry1) == 0); Assert.assertTrue(entry1.compareTo(entry2) < 0); Assert.assertTrue(entry2.compareTo(entry1) > 0); }