How to use expand dims jvm

I wrote this code to use expand dms

val test123: Constant[TFloat64] = tf.constant(array_data)
val test124: Constant[TFloat64]= tf.constant(0)
val final_test = tf.expandDims(test123, test124)

It gives me the following errror :

 thread "main" org.tensorflow.exceptions.TFInvalidArgumentException: Value for attr 'Tdim' of double is not in the list of allowed values: int32, int64
	; NodeDef: {{node ExpandDims}}; Op<name=ExpandDims; signature=input:T, dim:Tdim -> output:T; attr=T:type; attr=Tdim:type,default=DT_INT32,allowed=[DT_INT32, DT_INT64]>
	at org.tensorflow.internal.c_api.AbstractTF_Status.throwExceptionIfNotOK(
	at org.tensorflow.EagerOperationBuilder.execute(
	at org.tensorflow.op.core.ExpandDims.create(
	at org.tensorflow.op.Ops.expandDims(
	at HelloTensorFlow$.main(sdasdasdas.scala:211)
	at HelloTensorFlow.main(sdasdasdas.scala)

The second argument to expandDims should be a 32-bit or 64-bit integer tensor, not a 64-bit floating point tensor. Looks like we should tighten the type requirements to TIntegral from TNumber for the second argument.