use of org.datatransferproject.types.client.datatype.DataTypes in project data-transfer-project by google.
the class DataTypesActionTest method testHandle.
@Test
public void testHandle() {
AuthServiceProviderRegistry registry = mock(AuthServiceProviderRegistry.class);
Set<String> dataTypes = new HashSet<>(Arrays.asList("CONTACTS", "PHOTOS"));
when(registry.getTransferDataTypes()).thenReturn(dataTypes);
DataTypesAction dataTypesAction = new DataTypesAction(registry, new Monitor() {
});
GetDataTypes request = mock(GetDataTypes.class);
DataTypes actual = dataTypesAction.handle(request);
Assert.assertEquals(actual.getDataTypes(), dataTypes);
}
Aggregations