I am trying to write unit test case for a function which takes a parameter of type "org.springframework.http.codec.multipart.FilePart
" as an input.
However I am not able to figure out how to create a mock object of the class implementing above interface.
Browsing through some documentation, I found about MockMultipartFile
, however I am not able to figure out if the above object can be used to construct an instance of org.springframework.http.codec.multipart.FilePart
type.
private boolean isValidFile(FilePart filePart){
boolean valid = true;
// Do Something
return valid;
}
Can someone help me out please ?