### Question:
IntentFactory { public Intent buildIntent(IntentFactoryStrategy parameters) { android.content.Intent intent = intentMockFactory.buildIntent(context, parameters.getTargetContext()); intent.setFlags(parameters.getFlags()); for (String category : parameters.getCategories()){ intent.addCategory(category); } intent.putExtras(parameters.getExtras()); return intent; } @Inject  IntentFactory(Context context); protected  IntentFactory(Context context, IntentAdapterFactory intentMockFactory); void start(IntentFactoryStrategy parameters); Intent buildIntent(IntentFactoryStrategy parameters); PendingIntent buildPendingIntent(IntentFactoryStrategy parameters); PendingIntent buildPendingIntent(int requestCode, IntentFactoryStrategy parameters); PendingIntent buildPendingIntent(int requestCode, int flags, IntentFactoryStrategy parameters);  }### Answer:
@Test public void testBuildIntent(){ Mockito.when(intentMockFactory.buildIntent(mockContext, mockStrategy.getTargetContext())).thenReturn(mockIntent); Intent outputIntent = intentFactory.buildIntent(mockStrategy); assertEquals(mockIntent, outputIntent); Mockito.verify(mockIntent).putExtras(mockStrategy.getExtras()); }