// Path: src/main/java/com/hackerrank/LibraryFine.java
// static int calculateFine(int d1, int m1, int y1, int d2, int m2, int y2) {
//     final Calendar c1 = Calendar.getInstance();
//     final Calendar c2 = Calendar.getInstance();
// 
//     c1.set(y1, m1, d1);
//     c2.set(y2, m2, d2);
// 
//     if (c1.compareTo(c2) <= 0) {
//         return 0;
//     } else if (y1 > y2) {
//         return 10000;
//     } else if (m1 > m2) {
//         return 500 * (m1 - m2);
//     } else {
//         return 15 * (d1 - d2);
//     }
// }


import org.junit.Test;
import static com.hackerrank.LibraryFine.calculateFine;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;
package com.hackerrank;



public class LibraryFineTest {

    @Test
    public void sampleTest() {
// Path: src/main/java/com/hackerrank/LibraryFine.java
// static int calculateFine(int d1, int m1, int y1, int d2, int m2, int y2) {
//     final Calendar c1 = Calendar.getInstance();
//     final Calendar c2 = Calendar.getInstance();
// 
//     c1.set(y1, m1, d1);
//     c2.set(y2, m2, d2);
// 
//     if (c1.compareTo(c2) <= 0) {
//         return 0;
//     } else if (y1 > y2) {
//         return 10000;
//     } else if (m1 > m2) {
//         return 500 * (m1 - m2);
//     } else {
//         return 15 * (d1 - d2);
//     }
// }


// Path: src/test/java/com/hackerrank/LibraryFineTest.java
import org.junit.Test;
import static com.hackerrank.LibraryFine.calculateFine;
import static org.hamcrest.core.IsEqual.equalTo;
import static org.junit.Assert.assertThat;

package com.hackerrank;



public class LibraryFineTest {

    @Test
    public void sampleTest() {
        assertThat(calculateFine(9, 6, 2015, 6, 6, 2015), equalTo(45));