### Question:
PlaceServiceLevelDowngradeListener extends AbstractPlaceServiceLevelValueChangeListener { public int getPurgePinnedVideosAfterDays() { return purgePinnedVideosAfterDays; } @Inject  PlaceServiceLevelDowngradeListener(PlaceServiceLevelCache cacheMgr, PlatformMessageBus msgBus, VideoDao videoDao); int getPurgePinnedVideosAfterDays();  }### Answer:
@Test public void testDoOnMessageServiceLevelBasic() { PlatformMessage message = createListenerAndMessage(ServiceLevel.BASIC); EasyMock.expect(mockCache.isServiceLevelChange(message)).andReturn(true); EasyMock.expect(mockVideoDao.countByTag(curPlaceId, VideoConstants.TAG_FAVORITE)).andReturn(5l); Capture<Date> deleteTimeCapture = EasyMock.newCapture(CaptureType.LAST); mockVideoDao.addToPurgePinnedRecording(EasyMock.eq(curPlaceId), EasyMock.capture(deleteTimeCapture)); EasyMock.expectLastCall(); replay(); long now = System.currentTimeMillis(); theListener.onMessage(message); Date deleteTime = deleteTimeCapture.getValue(); int deleteDelay = (int) TimeUnit.MILLISECONDS.toDays(deleteTime.getTime() - now); assertEquals(theListener.getPurgePinnedVideosAfterDays(), deleteDelay); verify(); }