### Question:
ColorRGBA extends Message { public static ColorRGBA fromColor(Color c) { float r = (float) c.getRed() / 255.0f; float g = (float) c.getGreen() / 255.0f; float b = (float) c.getBlue() / 255.0f; float a = (float) c.getAlpha() / 255.0f; return new ColorRGBA(r, g, b, a); } ColorRGBA();  ColorRGBA(float r, float g, float b);  ColorRGBA(float r, float g, float b, float a); float getR(); float getG(); float getB(); float getA(); Color toColor(); @Override ColorRGBA clone(); static ColorRGBA fromColor(Color c); static ColorRGBA fromJsonString(java.lang.String jsonString); static ColorRGBA fromMessage(Message m); static ColorRGBA fromJsonObject(JsonObject jsonObject); static final java.lang.String FIELD_R; static final java.lang.String FIELD_G; static final java.lang.String FIELD_B; static final java.lang.String FIELD_A; static final java.lang.String TYPE; }### Answer:
@Test public void testFromColor() { Color color = new Color(10, 20, 30, 40); ColorRGBA c = ColorRGBA.fromColor(color); assertEquals((float) 10 / 255.0f, c.getR(), 0); assertEquals((float) 20 / 255.0f, c.getG(), 0); assertEquals((float) 30 / 255.0f, c.getB(), 0); assertEquals((float) 40 / 255.0f, c.getA(), 0); }