FlyteInputsUtils { static Literals.Literal buildLiteralForPartition(String value) { var primitive = Literals.Primitive.newBuilder().setDatetime(parseBest(value)).build(); return Literals.Literal.newBuilder() .setScalar(Literals.Scalar.newBuilder().setPrimitive(primitive).build()) .build(); } private  FlyteInputsUtils();   }
@Test public void shouldCreateLiteral() { var parameter = buildLiteralForPartition(PARAMETER); assertTrue(parameter.hasScalar()); assertTrue(parameter.getScalar().hasPrimitive()); assertTrue(parameter.getScalar().getPrimitive().getValueCase() == Literals.Primitive.ValueCase.DATETIME); assertThat(INSTANT.getEpochSecond(), equalTo(parameter.getScalar().getPrimitive().getDatetime().getSeconds())); }