Expand my Community achievements bar.

SOLVED

How to write junit for the below code

Avatar

Level 4

import org.osgi.service.component.annotations.Component;
import org.apache.sling.event.jobs.Job;
import org.apache.sling.event.jobs.consumer.JobConsumer;

@component(service=JobConsumer.class, property= {
JobConsumer.PROPERTY_TOPICS + "=my/special/jobtopic"
})
public class MyJobConsumer implements JobConsumer {

public JobResult process(final Job job) {
String path = job.getProperty("path");
return JobResult.OK;
}
}

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor