public void testBaseMessageOrBuilder() {
// Mostly just makes sure the base interface exists and has some methods.
TestAllTypes.Builder builder = TestAllTypes.newBuilder();
TestAllTypes message = builder.buildPartial();
TestAllTypesOrBuilder builderAsInterface = (TestAllTypesOrBuilder) builder;
TestAllTypesOrBuilder messageAsInterface = (TestAllTypesOrBuilder) message;
assertEquals(
messageAsInterface.getDefaultBool(),
messageAsInterface.getDefaultBool());
assertEquals(
messageAsInterface.getOptionalDouble(),
messageAsInterface.getOptionalDouble());
}