public static Action resolve(Schema writer, Schema reader, GenericData data) {
    return resolve(Schema.applyAliases(writer, reader), reader, data, new HashMap<>());
  }
@Test
  void resolveUnion() {
    final Schema schema = new TimeConversions.TimeMicrosConversion().getRecommendedSchema();

    final Schema writeSchema = Schema.createUnion(Schema.create(Schema.Type.INT));
    final Schema readSchema = Schema.createUnion(schema);

    Resolver.Action action = Resolver.resolve(writeSchema, readSchema);
    Assertions.assertNotNull(action);
    Assertions.assertEquals(action.type, Resolver.Action.Type.WRITER_UNION);
    MatcherAssert.assertThat("Wrong class for action", action, Matchers.instanceOf(Resolver.WriterUnion.class));

    Assertions.assertEquals(1, ((Resolver.WriterUnion) action).actions.length);
    Resolver.Action innerAction = ((Resolver.WriterUnion) action).actions[0];

    MatcherAssert.assertThat("Wrong class for action", innerAction, Matchers.instanceOf(Resolver.ReaderUnion.class));
    Resolver.ReaderUnion innerUnionAction = (Resolver.ReaderUnion) innerAction;
    Resolver.Action promoteAction = innerUnionAction.actualAction;
    Assertions.assertEquals(promoteAction.type, Resolver.Action.Type.PROMOTE);
    Assertions.assertNotNull(promoteAction.logicalType);
  }