private void expectFeatureCalls(Gadget gadget,
List<FeatureResource> gadgetResources,
Set<String> externLibs,
List<FeatureResource> externResources) {
reset(featureRegistry);
GadgetContext gadgetContext = gadget.getContext();
List<String> gadgetFeatures = Lists.newLinkedList(gadget.getDirectFeatureDeps());
List<String> allFeatures = Lists.newLinkedList(gadgetFeatures);
List<String> allFeaturesAndLibs = Lists.newLinkedList(gadgetFeatures);
allFeaturesAndLibs.addAll(externLibs);
List<String> allRequiredFeatures = Lists.newLinkedList(getAllRequiredFeatures(gadget));