### Question:
SmsResourceProvider { @Action public Promise<ActionResponse, ResourceException> getType(Context context) { try { return newActionResponse(getTypeValue(context)).asPromise(); } catch (SMSException | SSOException e) { return new InternalServerErrorException("Could not get service schema", e).asPromise(); } } SmsResourceProvider(ServiceSchema schema, SchemaType type, List<ServiceSchema> subSchemaPath, String uriPath,
            boolean serviceHasInstanceName, SmsJsonConverter converter, Debug debug,
            AMResourceBundleCache resourceBundleCache, Locale defaultLocale); @Action Promise<ActionResponse, ResourceException> schema(Context context); @Action Promise<ActionResponse, ResourceException> template(); @Action Promise<ActionResponse, ResourceException> getType(Context context); static final List<AttributeSchema.Syntax> NUMBER_SYNTAXES; }### Answer:
@Test public void verifyTypeAction() throws Exception { when(serviceSchema.getI18NFileName()).thenReturn("org/forgerock/openam/core/rest/sms/SmsResourceProviderTest"); when(serviceSchema.getResourceName()).thenReturn("one"); when(serviceSchema.getI18NKey()).thenReturn("subOne"); when(serviceSchema.supportsMultipleConfigurations()).thenReturn(false); SmsResourceProvider resourceProvider = new MySmsResourceProvider(serviceSchema, schemaType, subSchemaPath, uriPath, true, jsonConverter, debug); JsonValue returnedJV = resourceProvider.getType(context).getOrThrow().getJsonContent(); AssertJJsonValueAssert.assertThat(returnedJV) .isObject() .stringIs("_id", Conditions.equalTo("one")) .stringIs("name", Conditions.equalTo("Sub Schema One")) .booleanAt("collection").isFalse(); }