mercredi 28 août 2019

Scala EasyMock createNiceMock returns null

Hi I am creating a nice mock of a class whose method returns a spark DF.
I create nice mock because I do not want to get error on the dataframes schema in input.

val nextploraWeboramaDataFrameCombinerMock: DataFrameCombiner = createNiceMock(classOf[DataFrameCombiner])
expect(nextploraWeboramaDataFrameCombinerMock.combineDataFrames(nextFrequency, weboramaManipulated, nextplora))
  .andReturn(nextAugmentedCombined).times(1)
replay(nextploraWeboramaDataFrameCombinerMock)  

However it always returns a null value.
How can this be possible? ù Thanks

Aucun commentaire:

Enregistrer un commentaire