deployment.setAutoStart(!metadata.isFragment());
// Set the start level and prevent autostart if greater than the Framwork startlevel
AnnotationInstance slAware = getAnnotation(depUnit, "org.jboss.arquillian.osgi.StartLevelAware");
if (slAware != null) {
MethodInfo slTarget = (MethodInfo) slAware.target();
for (AnnotationInstance anDeployment : getAnnotations(depUnit, "org.jboss.arquillian.container.test.api.Deployment")) {
AnnotationValue namevalue = anDeployment.value("name");
Object deploymentName = namevalue != null ? namevalue.value() : null;
if (slTarget == anDeployment.target() && depUnit.getName().equals(deploymentName)) {
int startLevel = slAware.value("startLevel").asInt();