@Test
public void addAssetCsvXlsTest() {

    doNothing().when(this.kbuilder).add(any(Resource.class), any(ResourceType.class), any(ResourceConfiguration.class));
    // This is to verify that 2-argument method is never called
    doThrow(new IllegalStateException("CSV resource not handled correctly!")).when(this.kbuilder).add(any(Resource.class), any(ResourceType.class));
    Resource resource = ResourceFactory.newClassPathResource("/data/resource.csv", getClass());
    environment.addAsset(resource, ResourceType.DTABLE);
    doThrow(new IllegalStateException("XLS resource not handled correctly!")).when(this.kbuilder).add(any(Resource.class), any(ResourceType.class));
    resource = ResourceFactory.newClassPathResource("/data/resource.xls", getClass());
    environment.addAsset(resource, ResourceType.DTABLE);
    // control test
    doThrow(new IllegalStateException("BPMN2 resource not handled correctly!")).when(this.kbuilder).add(any(Resource.class), any(ResourceType.class), any(ResourceConfiguration.class));
    doNothing().when(this.kbuilder).add(any(Resource.class), any(ResourceType.class));
    resource = ResourceFactory.newClassPathResource("/data/resource.bpmn2", getClass());
    environment.addAsset(resource, ResourceType.BPMN2);
}