class ParticleTypeRedstone extends ParticleType {

    public Object packetColored(boolean far, Location loc,
                                Color color) {
        int r = color.getRed();
        if (r == 0) r = 1;
        return packet(far,
                loc.getX(),     loc.getY(),                 loc.getZ(),
                r / 255D,       color.getGreen() / 255D,    color.getBlue() / 255D,
                1D, 0);
    }

}

class ParticleTypeRedstoneTest {

    @Spy
    private ParticleTypeRedstone invalidParticleType;
    @Spy
    private ParticleTypeRedstone particleType;

    @Test
    public void test_packetColored_Pos_ColorWithRedEqualZero() {

        FakePacket target = new FakePacket(true,
                2D,             3D,             4D,
                1D / 255D,      120D / 255D,    60D / 255D,
                1D, 0);

        particleType.packetColored(true, target.getX(), target.getY(), target.getZ(),
                Color.fromRGB(0, 120, 60));

        // expect color to be calculated, needs delta check
        verifyArgumentPassWithDelta(target);
    }

}