### Question:
Transformers { static Map<String, Object> modelToCustomData(Model m) { ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder(); if(m.supports(DeviceCapability.NAMESPACE)) { String val = DeviceModel.getProductId(m); if(!StringUtils.isBlank(val)) builder.put(PRODUCT_ID, val); val = DeviceModel.getDevtypehint(m); if(!StringUtils.isBlank(val)) builder.put(TYPE_HINT, val); } else if (m.supports(SceneCapability.NAMESPACE)) { builder.put(TYPE_HINT, SceneCapability.NAMESPACE); } return builder.build(); } private  Transformers(); static Optional<GoogleDevice> modelToDevice(Model m, boolean whitelisted, @Nullable ProductCatalogEntry pm, boolean reportStateEnabled); static Map<String,Object> modelToStateMap(Model m, boolean hubOffline, boolean whitelisted, @Nullable ProductCatalogEntry pm); static Optional<MessageBody> commandToMessageBody(Model m, boolean hubOffline, String command, Map<String, Object> params, boolean whitelisted, @Nullable ProductCatalogEntry pm); static PlatformMessage requestToMessage(Request req, UUID placeId, String population, int ttl); static Response messageToResponse(PlatformMessage msg); static final Gson GSON; static final String PRODUCT_ID; static final String TYPE_HINT; }### Answer:
@Test public void testModelToCustom() { assertEquals(ImmutableMap.of(), Transformers.modelToCustomData(nonDevModel)); assertEquals(ImmutableMap.of( Transformers.PRODUCT_ID, "12345", Transformers.TYPE_HINT, "Light" ), Transformers.modelToCustomData(allCaps)); Model m = new SimpleModel(ModelFixtures.buildServiceAttributes(SceneCapability.NAMESPACE).create()); assertEquals(ImmutableMap.of( Transformers.TYPE_HINT, SceneCapability.NAMESPACE ), Transformers.modelToCustomData(m)); }