### Question:
FileInputTask implements ServletContextAware, InputTask { @Autowired public void setVehicleLocationService( VehicleLocationInferenceService vehicleLocationService) { _vehicleLocationService = vehicleLocationService; }  @Autowired void setVehicleLocationService(
      VehicleLocationInferenceService vehicleLocationService); @Autowired @Qualifier("fileInputService") void setInputService(
      InputService inputService); void setFilename(String filename); @Override void setServletContext(ServletContext servletContext); void setDepotPartitionKey(String depotPartitionKey); String getDepotPartitionKey(); @PostConstruct void execute(); @PreDestroy void destroy(); void startInsertionThread();  }### Answer:
@Test public void testProcessMessage() throws Exception { service.setVehicleLocationService(vehicleLocationInferenceService); final String message = "{\"RealtimeEnvelope\": {\"UUID\": \"foo\",\"timeReceived\": 1234567,\"CcLocationReport\": {\"request-id\" : 528271,\"vehicle\": {\"vehicle-id\": 8140,\"agency-id\": 2008,\"agencydesignator\": \"MTA NYCT\"},\"status-info\": 0,\"time-reported\": \"2011-10-15T03:26:19.000-00:00\",\"latitude\": 40612060,\"longitude\": -74035771,\"direction\": {\"deg\": 128.77},\"speed\": 0,\"manufacturer-data\": \"VFTP123456789\",\"operatorID\": {\"operator-id\": 0,\"designator\": \"\"},\"runID\": {\"run-id\": 0,\"designator\": \"\"},\"destSignCode\": 4631,\"routeID\": {\"route-id\": 0,\"route-designator\": \"\"},\"localCcLocationReport\": {\"NMEA\": {\"sentence\": [\"\",\"\"]}}}}}"; assertEquals(true, inputService.processMessage(null, message.getBytes())); }
@Test public void testNoOuterBrackets() throws Exception { service.setVehicleLocationService(vehicleLocationInferenceService); final String message = "\"RealtimeEnvelope\": {\"UUID\": \"foo\",\"timeReceived\": 1234567,\"CcLocationReport\": {\"request-id\" : 528271,\"vehicle\": {\"vehicle-id\": 8140,\"agency-id\": 2008,\"agencydesignator\": \"MTA NYCT\"},\"status-info\": 0,\"time-reported\": \"2011-10-15T03:26:19.000-00:00\",\"latitude\": 40612060,\"longitude\": -74035771,\"direction\": {\"deg\": 128.77},\"speed\": 0,\"manufacturer-data\": \"VFTP123456789\",\"operatorID\": {\"operator-id\": 0,\"designator\": \"\"},\"runID\": {\"run-id\": 0,\"designator\": \"\"},\"destSignCode\": 4631,\"routeID\": {\"route-id\": 0,\"route-designator\": \"\"},\"localCcLocationReport\": {\"NMEA\": {\"sentence\": [\"\",\"\"]}}}}"; assertEquals(true, inputService.processMessage(null, message.getBytes())); }