@Test
public void testLoadTargetArchive_invalidTarget() throws Exception {

	// Create a ZIP with valid properties
	Map<String,String> entryToContent = new HashMap<> ();
	entryToContent.put( "t1.properties", "id: tid-1\nhandler: h" );
	entryToContent.put( "t2.properties", "id: tid-2\n\nnname: my main target" );
	entryToContent.put( "t3.properties", "id: tid-3\nhandler: h\nname: my main target" );
	File targetFile = this.folder.newFile( "roboconf_targets.zip" );
	TestUtils.createZipFile( entryToContent, targetFile );
	Assert.assertTrue( targetFile.exists());
	// Preconditions
	Assert.assertEquals( 0, this.manager.targetsMngr().listAllTargets().size());
	// Upload it
	InputStream in = null;
	try {
		FormDataContentDisposition fd = FormDataContentDisposition
				.name( targetFile.getName())
				.fileName( targetFile.getName()).build();
		in = new FileInputStream( targetFile );
		Assert.assertEquals(
				Status.FORBIDDEN.getStatusCode(),
				this.resource.loadTargetArchive( in, fd ).getStatus());
	} finally {
		Utils.closeQuietly( in );
	}
	// Postconditions
	List<TargetWrapperDescriptor> targetIds = this.manager.targetsMngr().listAllTargets();
	Assert.assertEquals( 0, targetIds.size());
}