test_class.declarator: rule = new PowerMockRule()
test_class.modifier: @Rule
    public
test_class.original_string: @Rule
    public PowerMockRule rule = new PowerMockRule();
test_class.type: PowerMockRule
test_class.var_name: rule
test_class.declarator: packageNo1
test_class.modifier: @Mock
test_class.original_string: @Mock ReactPackage packageNo1;
test_class.type: ReactPackage
test_class.var_name: packageNo1
test_class.declarator: packageNo2
test_class.modifier: @Mock
test_class.original_string: @Mock ReactPackage packageNo2;
test_class.type: ReactPackage
test_class.var_name: packageNo2
test_class.declarator: packageNo3
test_class.modifier: @Mock
test_class.original_string: @Mock ReactPackage packageNo3;
test_class.type: ReactPackage
test_class.var_name: packageNo3
test_class.declarator: reactContext
test_class.modifier: @Mock
test_class.original_string: @Mock ReactApplicationContext reactContext;
test_class.type: ReactApplicationContext
test_class.var_name: reactContext
test_class.file: node_modules/react-native/ReactAndroid/src/test/java/com/facebook/react/CompositeReactPackageTest.java
test_class.identifier: CompositeReactPackageTest
test_case.body: @Test
    public void testThatCompositeReturnsASumOfNativeModules() {
      // Given
      CompositeReactPackage composite = new CompositeReactPackage(packageNo1, packageNo2);
  
      NativeModule moduleNo1 = mock(NativeModule.class);
      when(moduleNo1.getName()).thenReturn("ModuleNo1");
  
      // module2 and module3 will share same name, composite should return only the latter one
      final String sameModuleName = "SameModuleName";
  
      NativeModule moduleNo2 = mock(NativeModule.class);
      when(moduleNo2.getName()).thenReturn(sameModuleName);
  
      NativeModule moduleNo3 = mock(NativeModule.class);
      when(moduleNo3.getName()).thenReturn(sameModuleName);
  
      NativeModule moduleNo4 = mock(NativeModule.class);
      when(moduleNo4.getName()).thenReturn("ModuleNo4");
  
      when(packageNo1.createNativeModules(reactContext)).thenReturn(
          Arrays.asList(new NativeModule[]{moduleNo1, moduleNo2}));
  
      when(packageNo2.createNativeModules(reactContext)).thenReturn(
          Arrays.asList(new NativeModule[]{moduleNo3, moduleNo4}));
  
      // When
      List<NativeModule> compositeModules = composite.createNativeModules(reactContext);
  
      // Then
  
      // Wrapping lists into sets to be order-independent.
      // Note that there should be no module2 returned.
      Set<NativeModule> expected = new HashSet<>(
          Arrays.asList(new NativeModule[]{moduleNo1, moduleNo3, moduleNo4}));
      Set<NativeModule> actual = new HashSet<>(compositeModules);
  
      assertEquals(expected, actual);
    }
test_case.class_method_signature: CompositeReactPackageTest.testThatCompositeReturnsASumOfNativeModules()
test_case.full_signature: @Test public void testThatCompositeReturnsASumOfNativeModules()
test_case.identifier: testThatCompositeReturnsASumOfNativeModules
test_case.invocations: mock thenReturn when getName mock thenReturn when getName mock thenReturn when getName mock thenReturn when getName thenReturn when createNativeModules asList thenReturn when createNativeModules asList createNativeModules asList assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testThatCompositeReturnsASumOfNativeModules()
focal_class.declarator: mChildReactPackages = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final List<ReactPackage> mChildReactPackages = new ArrayList<>();
focal_class.type: List<ReactPackage>
focal_class.var_name: mChildReactPackages
focal_class.file: node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/CompositeReactPackage.java
focal_class.identifier: CompositeReactPackage
focal_class.interfaces: implements ReactPackage
focal_class.class_method_signature: CompositeReactPackage.CompositeReactPackage(ReactPackage arg1, ReactPackage arg2, ReactPackage... args)
focal_class.full_signature: public  CompositeReactPackage(ReactPackage arg1, ReactPackage arg2, ReactPackage... args)
focal_class.identifier: CompositeReactPackage
focal_class.modifiers: public
focal_class.parameters: (ReactPackage arg1, ReactPackage arg2, ReactPackage... args)
focal_class.signature:  CompositeReactPackage(ReactPackage arg1, ReactPackage arg2, ReactPackage... args)
focal_class.class_method_signature: CompositeReactPackage.createNativeModules(ReactApplicationContext reactContext)
focal_class.full_signature: @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext)
focal_class.identifier: createNativeModules
focal_class.modifiers: @Override public
focal_class.parameters: (ReactApplicationContext reactContext)
focal_class.return: List<NativeModule>
focal_class.signature: List<NativeModule> createNativeModules(ReactApplicationContext reactContext)
focal_class.class_method_signature: CompositeReactPackage.createJSModules()
focal_class.full_signature: @Override public List<Class<? extends JavaScriptModule>> createJSModules()
focal_class.identifier: createJSModules
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: List<Class<? extends JavaScriptModule>>
focal_class.signature: List<Class<? extends JavaScriptModule>> createJSModules()
focal_class.class_method_signature: CompositeReactPackage.createViewManagers(ReactApplicationContext reactContext)
focal_class.full_signature: @Override public List<ViewManager> createViewManagers(ReactApplicationContext reactContext)
focal_class.identifier: createViewManagers
focal_class.modifiers: @Override public
focal_class.parameters: (ReactApplicationContext reactContext)
focal_class.return: List<ViewManager>
focal_class.signature: List<ViewManager> createViewManagers(ReactApplicationContext reactContext)
focal_method.body: @Override
    public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
      final Map<String, NativeModule> moduleMap = new HashMap<>();
      for (ReactPackage reactPackage: mChildReactPackages) {
        for (NativeModule nativeModule: reactPackage.createNativeModules(reactContext)) {
          moduleMap.put(nativeModule.getName(), nativeModule);
        }
      }
      return new ArrayList(moduleMap.values());
    }
focal_method.class_method_signature: CompositeReactPackage.createNativeModules(ReactApplicationContext reactContext)
focal_method.full_signature: @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext)
focal_method.identifier: createNativeModules
focal_method.invocations: createNativeModules put getName values
focal_method.modifiers: @Override public
focal_method.parameters: (ReactApplicationContext reactContext)
focal_method.return: List<NativeModule>
focal_method.signature: List<NativeModule> createNativeModules(ReactApplicationContext reactContext)