@Test
public void should_return_error_when_uploadind_type_invalid() {

    expectedException.expect(IllegalArgumentException.class);
    expectedException.expectMessage(is("Part named [file] is needed to successfully import a component"));
    //We construct a mockfile (the first arg is the name of the property expected in the controller
    MockMultipartFile file = new MockMultipartFile("file", "myfile.js", "application/js", "".getBytes());
    assetService.upload(file, aPage().build(), "INVALID");
}