FIXValue { public void setTimeOnly(ReadableDateTime x, boolean millis) { setDigits(x.getHourOfDay(), 0, 2); bytes[2] = ':'; setDigits(x.getMinuteOfHour(), 3, 2); bytes[5] = ':'; setDigits(x.getSecondOfMinute(), 6, 2); if (millis) { bytes[8] = '.'; setDigits(x.getMillisOfSecond(), 9, 3); bytes[12] = SOH; length = 12; } else { bytes[8] = SOH; length = 8; } offset = 0; } FIXValue(int capacity); byte byteAt(int index); int length(); boolean contentEquals(byte x); boolean contentEquals(byte[] x); boolean contentEquals(char x); boolean contentEquals(CharSequence x); void copyTo(byte[] bytes); void reset(); void set(FIXValue value); boolean asBoolean(); void setBoolean(boolean x); char asChar(); void setChar(char x); long asInt(); void setInt(long x); double asFloat(); void setFloat(double x, int decimals); String asString(); void asString(Appendable x); void asString(StringBuilder x); void setString(CharSequence x); void asDate(MutableDateTime x); void setDate(ReadableDateTime x); void asTimeOnly(MutableDateTime x); void setTimeOnly(ReadableDateTime x, boolean millis); void asTimestamp(MutableDateTime x); void setTimestamp(ReadableDateTime x, boolean millis); @Deprecated long asCheckSum(); void setCheckSum(long x); boolean get(ByteBuffer buffer); void put(ByteBuffer buffer); @Override String toString(); void toString(StringBuilder builder);  }
@Test public void setTimeOnlyWithMillis() { value.setTimeOnly(new MutableDateTime(2015, 9, 24, 9, 30, 5, 250), true); assertPutEquals("09:30:05.250\u0001"); }
@Test public void setTimeOnlyWithoutMillis() { value.setTimeOnly(new MutableDateTime(2015, 9, 24, 9, 30, 5, 250), false); assertPutEquals("09:30:05\u0001"); }