@Test
public void testSetNumPieces()
{

    try {
        info.setNumPieces(0);
        fail("Zero pieces test failed");
    } catch (IllegalArgumentException e) { }

    info.partialSupport = false;
    try {
        info.setNumPieces(3);
        fail("Partial support test failed");
    } catch (IllegalStateException e) { }

    info.partialSupport = true;
    info.totalBytes = -1;
    try {
        info.setNumPieces(3);
        fail("Multipart with unavailable size test failed");
    } catch (IllegalStateException e) { }

    info.totalBytes = 0;
    try {
        info.setNumPieces(3);
        fail("Multipart with zero size test failed");
    } catch (IllegalStateException e) { }

    info.totalBytes = 2;
    try {
        info.setNumPieces(3);
        fail("Size less than pieces test failed");
    } catch (IllegalStateException e) { }
}