### Question:
Transformers { static Optional<String> devTypeHintToGoogleType(String devTypeHint) { if(StringUtils.isBlank(devTypeHint)) { return Optional.empty(); } String type; switch(devTypeHint) { case Constants.DeviceTypeHint.DIMMER: case Constants.DeviceTypeHint.LIGHT: type = Constants.Type.LIGHT; break; case Constants.DeviceTypeHint.SWITCH: type = Constants.Type.SWITCH; break; case Constants.DeviceTypeHint.THERMOSTAT: type = Constants.Type.THERMOSTAT; break; default: type = null; break; } return Optional.ofNullable(type); } 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 testDevTypeHintToGoogleType() { assertEquals(Optional.empty(), Transformers.devTypeHintToGoogleType(null)); assertEquals(Constants.Type.LIGHT, Transformers.devTypeHintToGoogleType(Constants.DeviceTypeHint.LIGHT).get()); assertEquals(Constants.Type.LIGHT, Transformers.devTypeHintToGoogleType(Constants.DeviceTypeHint.DIMMER).get()); assertEquals(Constants.Type.SWITCH, Transformers.devTypeHintToGoogleType(Constants.DeviceTypeHint.SWITCH).get()); assertEquals(Constants.Type.THERMOSTAT, Transformers.devTypeHintToGoogleType(Constants.DeviceTypeHint.THERMOSTAT).get()); assertEquals(Optional.empty(), Transformers.devTypeHintToGoogleType("Fan Control")); }