diff --git a/README.md b/README.md index 8cff13859..a39f562b6 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ Once the ODE is deployed and running locally, you may access the ODE's demonstra - [WYDOT Log Records](data/wydotLogRecords.h) 3. Press `Upload` button to upload the file to ODE. -Upload records within the files must be embedding BSM and/or TIM messages wrapped in J2735 MessageFrame and ASN.1 UPER encoded, wrapped in IEEE 1609.2 envelope and ASN.1 COER encoded binary format. Please review the files in the [data](data) folder for samples of each supported type. By uploading a valid data file, you will be able to observe the decoded messages contained within the file appear in the web UI page while connected to the WebSocket interface. +Upload records within the files can be embedding BSM, MAP and/or TIM messages wrapped in J2735 MessageFrame and ASN.1 UPER encoded, wrapped in IEEE 1609.2 envelope and ASN.1 COER encoded binary format. Log processing of files that contain messages with WSMP headers within the ASN.1 UPER encoded messages is supported but the header will be removed before processing. Please review the files in the [data](data) folder for samples of each supported type. By uploading a valid data file, you will be able to observe the decoded messages contained within the file appear in the web UI page while connected to the WebSocket interface. Another way data can be uploaded to the ODE is through copying the file to the location specified by the `ode.uploadLocationRoot/ode.uploadLocationObuLog`property. If not specified, Default locations would be `uploads/bsmlog`sub-directory off of the location where ODE is launched. diff --git a/data/bsmLogDuringEvent_commsignia.gz b/data/bsmLogDuringEvent_commsignia.gz new file mode 100644 index 000000000..7dac65aec Binary files /dev/null and b/data/bsmLogDuringEvent_commsignia.gz differ diff --git a/data/bsmTx_commsignia.gz b/data/bsmTx_commsignia.gz new file mode 100644 index 000000000..d3d080d18 Binary files /dev/null and b/data/bsmTx_commsignia.gz differ diff --git a/data/rxMsg_commsignia_map.gz b/data/rxMsg_commsignia_map.gz new file mode 100644 index 000000000..1ed4412f1 Binary files /dev/null and b/data/rxMsg_commsignia_map.gz differ diff --git a/data/rxMsg_commsignia_tim.gz b/data/rxMsg_commsignia_tim.gz new file mode 100644 index 000000000..29c61bf7c Binary files /dev/null and b/data/rxMsg_commsignia_tim.gz differ diff --git a/data/rxMsg_map_and_tim.gz b/data/rxMsg_map_and_tim.gz new file mode 100644 index 000000000..e3a7b4441 Binary files /dev/null and b/data/rxMsg_map_and_tim.gz differ diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisher.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisher.java index 4d8768f01..4306c3ce2 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisher.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisher.java @@ -16,9 +16,12 @@ package us.dot.its.jpo.ode.coder.stream; import java.io.BufferedInputStream; +import java.io.IOException; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -47,6 +50,7 @@ import us.dot.its.jpo.ode.model.SerialId; import us.dot.its.jpo.ode.util.JsonUtils; import us.dot.its.jpo.ode.util.XmlUtils; +import us.dot.its.jpo.ode.util.JsonUtils.JsonUtilsException; public class LogFileToAsn1CodecPublisher implements Asn1CodecPublisher { @@ -61,6 +65,7 @@ public LogFileToAsn1CodecPublisherException(String string, Exception e) { } protected static final Logger logger = LoggerFactory.getLogger(LogFileToAsn1CodecPublisher.class); + protected static HashMap msgStartFlags = new HashMap(); protected StringPublisher publisher; protected LogFileParser fileParser; @@ -69,6 +74,9 @@ public LogFileToAsn1CodecPublisherException(String string, Exception e) { public LogFileToAsn1CodecPublisher(StringPublisher dataPub) { this.publisher = dataPub; this.serialId = new SerialId(); + msgStartFlags.put("BSM", "0014"); + msgStartFlags.put("TIM", "001f"); + msgStartFlags.put("MAP", "0012"); } public List publish(BufferedInputStream bis, String fileName, ImporterFileType fileType) @@ -77,7 +85,7 @@ public List publish(BufferedInputStream bis, String fileName, ImporterF ParserStatus status; List dataList = new ArrayList<>(); - if (fileType == ImporterFileType.LEAR_LOG_FILE) { + if (fileType == ImporterFileType.LOG_FILE) { fileParser = LogFileParser.factory(fileName); do { @@ -92,6 +100,7 @@ public List publish(BufferedInputStream bis, String fileName, ImporterF } else { logger.error("Failed to decode ASN.1 data"); } + bis = removeNextNewLineCharacter(bis); } catch (Exception e) { throw new LogFileToAsn1CodecPublisherException("Error parsing or publishing data.", e); } @@ -146,6 +155,7 @@ private void publishList(XmlUtils xmlUtils, List dataList) throws JsonP serialId.setBundleSize(dataList.size()); for (OdeData odeData : dataList) { OdeLogMetadata msgMetadata = (OdeLogMetadata) odeData.getMetadata(); + OdeMsgPayload msgPayload = (OdeMsgPayload) odeData.getPayload(); msgMetadata.setSerialId(serialId); if (isDriverAlertRecord()) { @@ -153,31 +163,26 @@ private void publishList(XmlUtils xmlUtils, List dataList) throws JsonP publisher.publish(JsonUtils.toJson(odeData, false), publisher.getOdeProperties().getKafkaTopicDriverAlertJson()); - } - else - { + } else { if (isBsmRecord()) { logger.debug("Publishing a BSM"); - } else if(isSpatRecord()) { + } else if (isSpatRecord()) { logger.debug("Publishing a Spat"); - }else { - logger.debug("Publishing a TIM"); + } else { + logger.debug("Publishing a TIM or MAP"); } - - if(isSpatRecord() && msgMetadata instanceof OdeSpatMetadata - && !((OdeSpatMetadata)msgMetadata).getIsCertPresent() ) - { - //Nothing: If Spat log file and IEEE1609Cert is not present, Skip the Ieee1609Dot2Data encoding - } - else - { - Asn1Encoding msgEncoding = new Asn1Encoding("root", "Ieee1609Dot2Data", EncodingRule.COER); - msgMetadata.addEncoding(msgEncoding); + + if (!(isSpatRecord() && msgMetadata instanceof OdeSpatMetadata + && !((OdeSpatMetadata) msgMetadata).getIsCertPresent())) { + if (checkHeader(msgPayload) == "Ieee1609Dot2Data") { + Asn1Encoding msgEncoding = new Asn1Encoding("root", "Ieee1609Dot2Data", EncodingRule.COER); + msgMetadata.addEncoding(msgEncoding); + } } - - Asn1Encoding unsecuredDataEncoding = new Asn1Encoding("unsecuredData", "MessageFrame",EncodingRule.UPER); + + Asn1Encoding unsecuredDataEncoding = new Asn1Encoding("unsecuredData", "MessageFrame", + EncodingRule.UPER); msgMetadata.addEncoding(unsecuredDataEncoding); - publisher.publish(xmlUtils.toXml(odeData), publisher.getOdeProperties().getKafkaTopicAsn1DecoderInput()); @@ -186,4 +191,43 @@ private void publishList(XmlUtils xmlUtils, List dataList) throws JsonP } } + public String checkHeader(OdeMsgPayload payload) { + JSONObject payloadJson; + String header = null; + try { + payloadJson = JsonUtils.toJSONObject(payload.getData().toJson()); + String hexPacket = payloadJson.getString("bytes"); + + for (String key : msgStartFlags.keySet()) { + String startFlag = msgStartFlags.get(key); + int startIndex = hexPacket.toLowerCase().indexOf(startFlag); + logger.debug("Start index for " + key + "(" + startFlag + ")" + " is: " + startIndex); + if (startIndex <= 20 && startIndex != 0 && startIndex != -1) { + logger.debug("Message has supported Ieee1609Dot2Data header, adding encoding rule to Asn1DecoderInput XML"); + header = "Ieee1609Dot2Data"; + break; + } + logger.debug("Payload JSON: " + payloadJson); + } + } catch (JsonUtilsException e) { + logger.error("JsonUtilsException while checking message header. Stacktrace: " + e.toString()); + + } + return header; + } + + // This method will check if the next character is a newline character (0x0A in hex or 10 in converted decimal) + // or if the next character does not contain a newline character it will put that character back into the buffered input stream + public BufferedInputStream removeNextNewLineCharacter(BufferedInputStream bis) { + try { + bis.mark(1); + int nextByte = bis.read(); + if (nextByte != 10) { // If the next byte is not a newline + bis.reset(); // Reset the stream back to the most recent mark + } + } catch (IOException e) { + e.printStackTrace(); + } + return bis; + } } diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcher.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcher.java index 93a35cf83..40194c430 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcher.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcher.java @@ -29,7 +29,7 @@ public class ImporterDirectoryWatcher implements Runnable { public enum ImporterFileType { - LEAR_LOG_FILE, JSON_FILE + LOG_FILE, JSON_FILE } private static final Logger logger = LoggerFactory.getLogger(ImporterDirectoryWatcher.class); diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/BsmLogFileParser.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/BsmLogFileParser.java index 392f10143..4e7f808cb 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/BsmLogFileParser.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/BsmLogFileParser.java @@ -54,14 +54,13 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F return status; setBsmSource(readBuffer); } - - + if (getStep() == 2) { status = nextStep(bis, fileName, locationParser); if (status != ParserStatus.COMPLETE) return status; } - + if (getStep() == 3) { status = nextStep(bis, fileName, timeParser); if (status != ParserStatus.COMPLETE) @@ -79,7 +78,7 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F if (status != ParserStatus.COMPLETE) return status; } - + resetStep(); status = ParserStatus.COMPLETE; @@ -101,16 +100,17 @@ public void setBsmSource(BsmSource bsmSource) { public void setBsmSource(byte[] code) { try { setBsmSource(BsmSource.values()[code[0]]); + } catch (Exception e) { - logger.error("Invalid BsmSource: {}. Valid values are {}-{} inclusive", - code, 0, BsmSource.values()); + logger.error("Invalid BsmSource: {}. Valid values are {}-{} inclusive", + code, 0, BsmSource.values()); setBsmSource(BsmSource.unknown); } } - @Override - public void writeTo(OutputStream os) throws IOException { - os.write((byte)bsmSource.ordinal()); - super.writeTo(os); - } + @Override + public void writeTo(OutputStream os) throws IOException { + os.write((byte) bsmSource.ordinal()); + super.writeTo(os); + } } diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/DriverAlertFileParser.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/DriverAlertFileParser.java index a88b6f240..15e5470d4 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/DriverAlertFileParser.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/DriverAlertFileParser.java @@ -18,7 +18,6 @@ import java.io.BufferedInputStream; import java.io.IOException; import java.io.OutputStream; - public class DriverAlertFileParser extends LogFileParser { private String alert; @@ -32,7 +31,7 @@ public DriverAlertFileParser() { @Override public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws FileParserException { - + ParserStatus status; try { status = super.parseFile(bis, fileName); diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/LogFileParser.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/LogFileParser.java index f7189134c..07fe0059f 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/LogFileParser.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/LogFileParser.java @@ -118,7 +118,7 @@ public ParserStatus parseStep(BufferedInputStream bis, int length) throws FilePa try { bis.reset(); } catch (IOException ioe) { - throw new FileParserException("Error reseting Input Stream to marked position", ioe); + throw new FileParserException("Error resetting Input Stream to marked position", ioe); } } return ParserStatus.PARTIAL; diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/PayloadParser.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/PayloadParser.java index f9eb83291..6df64d68a 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/PayloadParser.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/PayloadParser.java @@ -20,18 +20,31 @@ import java.io.OutputStream; import java.nio.ByteOrder; import java.util.Arrays; +import java.util.HashMap; + +import org.apache.tomcat.util.buf.HexUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import us.dot.its.jpo.ode.util.CodecUtils; public class PayloadParser extends LogFileParser { - public static final int PAYLOAD_LENGTH_LENGTH = 2; + private static Logger logger = LoggerFactory.getLogger(PayloadParser.class); + private static HashMap msgStartFlags = new HashMap(); + private static final int HEADER_SIZE = 20; + public static final int PAYLOAD_LENGTH = 2; + protected short payloadLength; protected byte[] payload; + protected String payloadType; public PayloadParser() { super(); + msgStartFlags.put("BSM", "0014"); + msgStartFlags.put("TIM", "001f"); + msgStartFlags.put("MAP", "0012"); } @Override @@ -41,10 +54,12 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F try { // parse payload length if (getStep() == 0) { - status = parseStep(bis, PAYLOAD_LENGTH_LENGTH); + status = parseStep(bis, PAYLOAD_LENGTH); if (status != ParserStatus.COMPLETE) return status; - setPayloadLength(CodecUtils.bytesToShort(readBuffer, 0, PAYLOAD_LENGTH_LENGTH, ByteOrder.LITTLE_ENDIAN)); + short length = CodecUtils.bytesToShort(readBuffer, 0, PAYLOAD_LENGTH, ByteOrder.LITTLE_ENDIAN); + logger.debug("Payload length is: " + length); + setPayloadLength(length); } // Step 10 - copy payload bytes @@ -52,7 +67,7 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F status = parseStep(bis, getPayloadLength()); if (status != ParserStatus.COMPLETE) return status; - setPayload(Arrays.copyOf(readBuffer, getPayloadLength())); + setPayload(removeHeader(Arrays.copyOf(readBuffer, getPayloadLength()))); } resetStep(); @@ -90,4 +105,37 @@ public void writeTo(OutputStream os) throws IOException { os.write(payload, 0, payloadLength); } + + + public byte[] removeHeader(byte[] packet) { + String hexPacket = HexUtils.toHexString(packet); + String hexPacketParsed = ""; + for (String key : msgStartFlags.keySet()) { + String startFlag = msgStartFlags.get(key); + int startIndex = hexPacket.toLowerCase().indexOf(startFlag); + if (hexPacketParsed == ""){ + logger.debug("Start index for: " + key + " is: " + startIndex); + if (startIndex == -1) { + logger.debug("Message does not have header for: " + key); + break; + } else if (startIndex <= HEADER_SIZE) { + logger.debug("Message has supported header. startIndex: " + startIndex + " msgFlag: " + startFlag); + hexPacketParsed = hexPacket; + // Using a value of 35 as the largest index from preliminary testing data. + } else if (startIndex > HEADER_SIZE && startIndex < 35) { + int trueStartIndex = HEADER_SIZE + + hexPacket.substring(HEADER_SIZE, hexPacket.length()).indexOf(startFlag); + logger.debug("Found payload start at: " + trueStartIndex); + hexPacketParsed = hexPacket.substring(trueStartIndex, hexPacket.length()); + } + } + } + if (hexPacketParsed == ""){ + hexPacketParsed = hexPacket; + logger.debug("Could not identify a Header in the following packet: " + hexPacketParsed); + } else { + logger.debug("Payload hex: " + hexPacketParsed); + } + return HexUtils.fromHexString(hexPacketParsed); + } } diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/RxMsgFileParser.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/RxMsgFileParser.java index 5eeaf41c3..72b576af8 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/RxMsgFileParser.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/importer/parser/RxMsgFileParser.java @@ -29,7 +29,7 @@ public class RxMsgFileParser extends LogFileParser { private static final Logger logger = LoggerFactory.getLogger(RxMsgFileParser.class); private static final int RX_SOURCE_LENGTH = 1; - + private RxSource rxSource; public RxMsgFileParser() { @@ -55,9 +55,9 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F if (status != ParserStatus.COMPLETE) return status; try { - setRxSource(RxSource.values()[readBuffer[0]]); + setRxSource(readBuffer[0]); } catch (Exception e) { - setRxSource(RxSource.UNKNOWN); + setRxSource(RxSource.UNKNOWN); } } @@ -66,7 +66,7 @@ public ParserStatus parseFile(BufferedInputStream bis, String fileName) throws F if (status != ParserStatus.COMPLETE) return status; } - + if (getStep() == 3) { status = nextStep(bis, fileName, timeParser); if (status != ParserStatus.COMPLETE) @@ -101,6 +101,7 @@ public RxSource getRxSource() { } public void setRxSource(RxSource rxSource) { + logger.debug("rxSourceOrdinal value: " + rxSource); this.rxSource = rxSource; } @@ -108,15 +109,15 @@ public void setRxSource(int rxSourceOrdinal) { try { setRxSource(RxSource.values()[rxSourceOrdinal]); } catch (Exception e) { - logger.error("Invalid RxSource: {}. Valid values are {}: ", - rxSourceOrdinal, RxSource.values()); + logger.error("Invalid RxSource: {}. Valid values are {}: ", + rxSourceOrdinal, RxSource.values()); setRxSource(RxSource.UNKNOWN); } } - @Override - public void writeTo(OutputStream os) throws IOException { - os.write((byte)rxSource.ordinal()); - super.writeTo(os); - } + @Override + public void writeTo(OutputStream os) throws IOException { + os.write((byte) rxSource.ordinal()); + super.writeTo(os); + } } diff --git a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/upload/FileUploadController.java b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/upload/FileUploadController.java index ac848a527..1f1bf852f 100644 --- a/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/upload/FileUploadController.java +++ b/jpo-ode-svcs/src/main/java/us/dot/its/jpo/ode/upload/FileUploadController.java @@ -67,7 +67,7 @@ public FileUploadController( logger.debug("UPLOADER - Backup directory: {}", backupPath); // Create the importers that watch folders for new/modified files - threadPool.submit(new ImporterDirectoryWatcher(odeProperties, logPath, backupPath, failurePath, ImporterFileType.LEAR_LOG_FILE, odeProperties.getFileWatcherPeriod())); + threadPool.submit(new ImporterDirectoryWatcher(odeProperties, logPath, backupPath, failurePath, ImporterFileType.LOG_FILE, odeProperties.getFileWatcherPeriod())); // Create unfiltered exporters threadPool.submit(new StompStringExporter(odeProperties, UNFILTERED_OUTPUT_TOPIC, template, odeProperties.getKafkaTopicOdeBsmJson())); diff --git a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisherTest.java b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisherTest.java index 8daf0f30e..8f71c68c8 100644 --- a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisherTest.java +++ b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/coder/stream/LogFileToAsn1CodecPublisherTest.java @@ -71,7 +71,7 @@ public void testPublishInit(@Mocked LogFileParser mockLogFileParser) throws Exce List dataList = testLogFileToAsn1CodecPublisher.publish( new BufferedInputStream(new ByteArrayInputStream(new byte[0])), - "fileName", ImporterFileType.LEAR_LOG_FILE); + "fileName", ImporterFileType.LOG_FILE); assertTrue(dataList.isEmpty()); } @@ -90,18 +90,20 @@ public void testPublishEOF(@Mocked LogFileParser mockLogFileParser) throws Excep List dataList = testLogFileToAsn1CodecPublisher.publish( new BufferedInputStream(new ByteArrayInputStream(new byte[0])), - "fileName", ImporterFileType.LEAR_LOG_FILE); + "fileName", ImporterFileType.LOG_FILE); assertTrue(dataList.isEmpty()); } @Test public void testPublishThrowsIllegalArgumentException() throws Exception { + // If the filename does not follow expected filename pattern, + // IllegalArgumentException should be thrown assertThrows(IllegalArgumentException.class, () -> { // If the filename does not follow expected filename pattern, // IllegalArgumentException should be thrown testLogFileToAsn1CodecPublisher.publish(new BufferedInputStream(new ByteArrayInputStream(new byte[0])), - "fileName", ImporterFileType.LEAR_LOG_FILE); + "fileName", ImporterFileType.LOG_FILE); fail("Expected an IllegalArgumentException to be thrown"); }); } @@ -109,28 +111,28 @@ public void testPublishThrowsIllegalArgumentException() throws Exception { @Test public void testPublishThrowsLogFileToAsn1CodecPublisherException(@Mocked LogFileParser mockLogFileParser) throws Exception { - assertThrows(LogFileToAsn1CodecPublisherException.class, () -> { - new Expectations() { - { - LogFileParser.factory(anyString); - result = mockLogFileParser; - - /* - * If the embedded parser fails to parse a log file header, it may throw an - * exception - * which is then caught by the parser and re-thrown as - * LogFileToAsn1CodecPublisherException. - * This mocked object will simulate that eventuality. - */ - mockLogFileParser.parseFile((BufferedInputStream) any, anyString); - result = new LogFileToAsn1CodecPublisherException(anyString, (Exception) any); - } - }; - - testLogFileToAsn1CodecPublisher.publish(new BufferedInputStream(new ByteArrayInputStream(new byte[0])), - "fileName", ImporterFileType.LEAR_LOG_FILE); - fail("Expected an LogFileToAsn1CodecPublisherException to be thrown"); - }); + assertThrows(LogFileToAsn1CodecPublisherException.class, () -> { + new Expectations() { + { + LogFileParser.factory(anyString); + result = mockLogFileParser; + + /* + * If the embedded parser fails to parse a log file header, it may throw an + * exception + * which is then caught by the parser and re-thrown as + * LogFileToAsn1CodecPublisherException. + * This mocked object will simulate that eventuality. + */ + mockLogFileParser.parseFile((BufferedInputStream) any, anyString); + result = new LogFileToAsn1CodecPublisherException(anyString, (Exception) any); + } + }; + + testLogFileToAsn1CodecPublisher.publish(new BufferedInputStream(new ByteArrayInputStream(new byte[0])), + "fileName", ImporterFileType.LOG_FILE); + fail("Expected an LogFileToAsn1CodecPublisherException to be thrown"); + }); } @Test @@ -147,7 +149,7 @@ public void testPublishDecodeFailure(@Mocked LogFileParser mockLogFileParser) th List dataList = testLogFileToAsn1CodecPublisher.publish( new BufferedInputStream(new ByteArrayInputStream(new byte[0])), - "fileName", ImporterFileType.LEAR_LOG_FILE); + "fileName", ImporterFileType.LOG_FILE); assertTrue(dataList.isEmpty()); } @@ -167,21 +169,21 @@ public void testPublishBsmTxLogFile() throws Exception { (byte) 0x00, // 5. securityResultCode (byte) 0x06, (byte) 0x00, // 6.0 payloadLength // 6.1 payload - (byte) 0x03, (byte) 0x81, (byte) 0x00, (byte) 0x40, (byte) 0x03, (byte) 0x80 + (byte) 0x03, (byte) 0x81, (byte) 0x00, (byte) 0x14, (byte) 0x03, (byte) 0x80 }; String filename = RecordType.bsmTx.name() + GZ; BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); - List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LEAR_LOG_FILE); + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); for (OdeData data : dataList) { assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), DateTimeUtils.nowZDT()) > 0); data.getMetadata().setOdeReceivedAt("2019-03-05T20:31:17.579Z"); data.getMetadata().getSerialId().setStreamId("c7bbb42e-1e39-442d-98ac-62740ca50f92"); - var expected = "{\"metadata\":{\"bsmSource\":\"EV\",\"logFileName\":\"bsmTx.gz\",\"recordType\":\"bsmTx\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"NA\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100400380\"}}}"; + var expected = "{\"metadata\":{\"bsmSource\":\"EV\",\"logFileName\":\"bsmTx.gz\",\"recordType\":\"bsmTx\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"NA\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100140380\"}}}"; assertEquals(expected, data.toJson()); } } @@ -207,7 +209,7 @@ public void testPublishDistressNotificationLogFile() throws Exception { BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); - List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LEAR_LOG_FILE); + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); for (OdeData data : dataList) { assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), @@ -215,7 +217,6 @@ public void testPublishDistressNotificationLogFile() throws Exception { data.getMetadata().setOdeReceivedAt("2019-03-05T20:31:17.579Z"); data.getMetadata().getSerialId().setStreamId("c7bbb42e-1e39-442d-98ac-62740ca50f92"); var expected = "{\"metadata\":{\"logFileName\":\"dnMsg.gz\",\"recordType\":\"dnMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"NA\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100400380\"}}}"; - assertEquals(expected, data.toJson()); } } @@ -228,6 +229,7 @@ public void testPublishDriverAlertLogFile() throws Exception { (byte) 0x67, (byte) 0x06, (byte) 0x00, (byte) 0x00, // 1.2 elevation (byte) 0x04, (byte) 0x00, // 1.3 speed (byte) 0x09, (byte) 0x27, // 1.4 heading + (byte) 0xa9, (byte) 0x2c, (byte) 0xe2, (byte) 0x5a, // 2. utcTimeInSec (byte) 0x8f, (byte) 0x01, // 3. mSec (byte) 0x11, (byte) 0x00, // 4.0 payloadLength @@ -239,7 +241,7 @@ public void testPublishDriverAlertLogFile() throws Exception { BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); - List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LEAR_LOG_FILE); + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); for (OdeData data : dataList) { assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), @@ -266,21 +268,21 @@ public void testPublishRxMsgTIMLogFile() throws Exception { (byte) 0x00, // 5. securityResultCode (byte) 0x06, (byte) 0x00, // 6.0 payloadLength // 6.1 payload - (byte) 0x03, (byte) 0x81, (byte) 0x00, (byte) 0x40, (byte) 0x03, (byte) 0x80 + (byte) 0x03, (byte) 0x81, (byte) 0x00, (byte) 0x14, (byte) 0x03, (byte) 0x80 }; String filename = RecordType.rxMsg.name() + GZ; BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); - List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LEAR_LOG_FILE); + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); for (OdeData data : dataList) { assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), DateTimeUtils.nowZDT()) > 0); data.getMetadata().setOdeReceivedAt("2019-03-05T20:31:17.579Z"); data.getMetadata().getSerialId().setStreamId("c7bbb42e-1e39-442d-98ac-62740ca50f92"); - var expected = "{\"metadata\":{\"logFileName\":\"rxMsg.gz\",\"recordType\":\"rxMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"SAT\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"TMC_VIA_SAT\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100400380\"}}}"; + var expected = "{\"metadata\":{\"logFileName\":\"rxMsg.gz\",\"recordType\":\"rxMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"SAT\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"TMC_VIA_SAT\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100140380\"}}}"; assertEquals(expected, data.toJson()); } } @@ -300,21 +302,21 @@ public void testPublishRxMsgBSMLogFile() throws Exception { (byte) 0x00, // 5. securityResultCode (byte) 0x06, (byte) 0x00, // 6.0 payloadLength // 6.1 payload - (byte) 0x03, (byte) 0x81, (byte) 0x00, (byte) 0x40, (byte) 0x03, (byte) 0x80 + (byte) 0x11, (byte) 0x81, (byte) 0x00, (byte) 0x14, (byte) 0x03, (byte) 0x80 }; String filename = RecordType.rxMsg.name() + GZ; BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); - List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LEAR_LOG_FILE); + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); for (OdeData data : dataList) { assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), DateTimeUtils.nowZDT()) > 0); data.getMetadata().setOdeReceivedAt("2019-03-05T20:31:17.579Z"); data.getMetadata().getSerialId().setStreamId("c7bbb42e-1e39-442d-98ac-62740ca50f92"); - var expected = "{\"metadata\":{\"bsmSource\":\"RV\",\"logFileName\":\"rxMsg.gz\",\"recordType\":\"rxMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"RV\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"038100400380\"}}}"; + var expected = "{\"metadata\":{\"bsmSource\":\"RV\",\"logFileName\":\"rxMsg.gz\",\"recordType\":\"rxMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"RV\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"118100140380\"}}}"; assertEquals(expected, data.toJson()); } } @@ -339,4 +341,39 @@ public void testPublishNonLearLogFile() throws Exception { assertTrue(dataList.isEmpty()); } + @Test + public void testPublishRxMsgBSMLogFileNewLine() throws Exception { + + byte[] buf = new byte[] { + (byte) 0x02, // 1. RxSource = RV + (byte) 0x6f, (byte) 0x75, (byte) 0x4d, (byte) 0x19, // 2.0 latitude + (byte) 0xa4, (byte) 0xa1, (byte) 0x5c, (byte) 0xce, // 2.1 longitude + (byte) 0x67, (byte) 0x06, (byte) 0x00, (byte) 0x00, // 2.3 elevation + (byte) 0x04, (byte) 0x00, // 2.3 speed + (byte) 0x09, (byte) 0x27, // 2.4 heading + (byte) 0xa9, (byte) 0x2c, (byte) 0xe2, (byte) 0x5a, // 3. utcTimeInSec + (byte) 0x8f, (byte) 0x01, // 4. mSec + (byte) 0x00, // 5. securityResultCode + (byte) 0x06, (byte) 0x00, // 6.0 payloadLength + // 6.1 payload + (byte) 0x11, (byte) 0x81, (byte) 0x00, (byte) 0x14, (byte) 0x03, (byte) 0x80, + (byte) 0x0a + }; + + String filename = RecordType.rxMsg.name() + GZ; + + BufferedInputStream bis = new BufferedInputStream(new ByteArrayInputStream(buf)); + + List dataList = testLogFileToAsn1CodecPublisher.publish(bis, filename, ImporterFileType.LOG_FILE); + + for (OdeData data : dataList) { + assertTrue(DateTimeUtils.difference(DateTimeUtils.isoDateTime(data.getMetadata().getOdeReceivedAt()), + DateTimeUtils.nowZDT()) > 0); + data.getMetadata().setOdeReceivedAt("2019-03-05T20:31:17.579Z"); + data.getMetadata().getSerialId().setStreamId("c7bbb42e-1e39-442d-98ac-62740ca50f92"); + var expected = "{\"metadata\":{\"bsmSource\":\"RV\",\"logFileName\":\"rxMsg.gz\",\"recordType\":\"rxMsg\",\"securityResultCode\":\"success\",\"receivedMessageDetails\":{\"locationData\":{\"latitude\":\"42.4506735\",\"longitude\":\"-83.2790108\",\"elevation\":\"163.9\",\"speed\":\"0.08\",\"heading\":\"124.9125\"},\"rxSource\":\"RV\"},\"encodings\":[{\"elementName\":\"root\",\"elementType\":\"Ieee1609Dot2Data\",\"encodingRule\":\"COER\"},{\"elementName\":\"unsecuredData\",\"elementType\":\"MessageFrame\",\"encodingRule\":\"UPER\"}],\"payloadType\":\"us.dot.its.jpo.ode.model.OdeAsn1Payload\",\"serialId\":{\"streamId\":\"c7bbb42e-1e39-442d-98ac-62740ca50f92\",\"bundleSize\":1,\"bundleId\":1,\"recordId\":0,\"serialNumber\":1},\"odeReceivedAt\":\"2019-03-05T20:31:17.579Z\",\"schemaVersion\":6,\"maxDurationTime\":0,\"recordGeneratedAt\":\"2018-04-26T19:46:49.399Z\",\"recordGeneratedBy\":\"OBU\",\"sanitized\":false},\"payload\":{\"dataType\":\"us.dot.its.jpo.ode.model.OdeHexByteArray\",\"data\":{\"bytes\":\"118100140380\"}}}"; + assertEquals(expected, data.toJson()); + } + } + } diff --git a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTest.java b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTest.java index fda515dd8..02bd8bfe5 100644 --- a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTest.java +++ b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTest.java @@ -45,7 +45,7 @@ public class ImporterDirectoryWatcherTest { @Injectable Path backupDir; @Injectable - ImporterFileType injectableImporterFileType = ImporterFileType.LEAR_LOG_FILE; + ImporterFileType injectableImporterFileType = ImporterFileType.LOG_FILE; @Injectable Integer timePeriod = 5; diff --git a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTestOld.java b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTestOld.java index 3765d1a39..32e43b921 100644 --- a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTestOld.java +++ b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterDirectoryWatcherTestOld.java @@ -68,20 +68,18 @@ public class ImporterDirectoryWatcherTestOld { @BeforeEach public void createTestObject() { - if (testImporterDirectoryWatcher == null) { - try { - new Expectations() { - { - OdeFileUtils.createDirectoryRecursively((Path) any); - times = 3; - } - }; - } catch (IOException e) { - fail("Unexpected exception in expectations block: " + e); - } - testImporterDirectoryWatcher = new ImporterDirectoryWatcher(injectableOdeProperties, mockDir, backupDir, failureDir, ImporterFileType.LEAR_LOG_FILE, timePeriod); - testImporterDirectoryWatcher.setWatching(false); + try { + new Expectations() { + { + OdeFileUtils.createDirectoryRecursively((Path) any); + times = 3; + } + }; + } catch (IOException e) { + fail("Unexpected exception in expectations block: " + e); } + testImporterDirectoryWatcher = new ImporterDirectoryWatcher(injectableOdeProperties, mockDir, backupDir, failureDir, ImporterFileType.LOG_FILE, timePeriod); + testImporterDirectoryWatcher.setWatching(false); } @Test @@ -96,7 +94,7 @@ public void testConstructorOdeUtilsException() { } catch (IOException e) { fail("Unexpected exception in expectations block: " + e); } - new ImporterDirectoryWatcher(injectableOdeProperties, mockDir, backupDir, failureDir, ImporterFileType.LEAR_LOG_FILE, timePeriod); + new ImporterDirectoryWatcher(injectableOdeProperties, mockDir, backupDir, failureDir, ImporterFileType.LOG_FILE, timePeriod); } @Test diff --git a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterProcessorTest.java b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterProcessorTest.java index 2d47a70b2..9e8ff6317 100644 --- a/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterProcessorTest.java +++ b/jpo-ode-svcs/src/test/java/us/dot/its/jpo/ode/importer/ImporterProcessorTest.java @@ -46,7 +46,7 @@ public class ImporterProcessorTest { @Injectable OdeProperties injectableOdeProperties; @Injectable - ImporterFileType injectableImporterDirType = ImporterFileType.LEAR_LOG_FILE; + ImporterFileType injectableImporterDirType = ImporterFileType.LOG_FILE; // @Capturing // FileAsn1CodecPublisher capturingFileAsn1CodecPublisher;